Pre loader

MouseWheelZoomModifier doesn't care about ExecuteOn

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

I need MouseWheelZoomModifier to work only when I pressed mouse button. I wrote:
<s:MouseWheelZoomModifier ExecuteOn="MouseRightButton" />
But it all the same executing when I’m not pressing mouse button. Why?

Version
5.1.0.11243
  • You must to post comments
0
0

I extended MouseWheelZoomModifier and override OnModifierMouseWheel:

public override void OnModifierMouseWheel(ModifierMouseArgs e) {
    if (MatchesExecuteOn( e.MouseButtons, ExecuteOn )) {
        base.OnModifierMouseWheel( e );
    }
}

But e.MouseButtons always None. Why?

  • Andrew Burnett-Thompson
    because e.MouseButtons comes from the mouse event, which is a MouseWheel event, which has no buttons :) Try overriding OnModifierMouseDown/Up and storing e.MouseButtons there. Or use another way to detect if mouse button is down in WPF.
  • You must to post comments
0
0

Hi Denis

MouseWheelZoomModifier ignores ExecuteOn (which is a property on ChartModifierBase). Think about it, it doesn’t make sense to see a user holding a mouse button AND the wheel at the same time…

What are you trying to achieve and why?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

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

Start TrialCase Studies