SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

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

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
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
    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
Showing 2 results
Your Answer

Please first to submit.