Pre loader


All Answers » Re: Is there a way for the ViewModel to know if the user has Zoomed on the dataplot? » Comments for "Re: Is there a way for the ViewModel to know if the user has Zoomed on the dataplot?"
  • Matthew Becker
    Thanks Andrew! I’ll try adding an event in the overridden function like the example shows. It sounds like that should do what I need!
  • Matthew Becker
    Inthe RubberBandXyModifier, I’ve tried adding an EventTrigger on “MouseUp” to call my ViewModel command function, but it doesn’t seem to trigger at all. Should this be working like this or am I doing something wrong? Thanks!
  • Andrew Burnett-Thompson
    Hi Matthew, that won’t work! You need to subclass RubberBandXyZoomModifier and override OnModifierMouseUp and add your own event or mechanism to call to view model . Best regards, Andrew
  • Matthew Becker
    I’m almost there… I’ve got the custom ZoomModifiers sending an event that the ViewModel handles now. But one more problem. When I double-click for a ZoomExtents, instead it triggers two RubberBand MouseUp events and I never get the ZoomExtents DoubleClick event. Do I need to add something in my custom RubberBand Modifier to prevent this? Thanks!
  • Matthew Becker
    Didn’t have the ZoomModifier event handler in place, but even with it in place, it still receives a RubberBand MouseUp, the ZoomExtents DoubleClick, and then another RubberBand MouseUp…
  • Matthew Becker
    I think the more accurate question is: Is there a way for me to know if the base RubberBandXyZoomModifer.OnModifierMouseUp() actually was successful so I know to send my corresponding event? (Since if the mouse only moves a small amount, the rubberband zoom won’t occur…)

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies