MouseWheelZoomModifier
The MouseWheelZoomModifier provides zooming, or panning via the mousewheel.
Declaring a MouseWheelZoomModifier in XAML
Declaring a MouseWheelZoomModifier |
Copy Code |
---|---|
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart" --> <s:SciChartSurface> <s:SciChartSurface.ChartModifier> <s:ModifierGroup> <s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection"/> </s:ModifierGroup> </s:SciChartSurface.ChartModifier> </s:SciChartSurface> |
Declaring a MouseWheelZoomModifier in Code
Declaring a MouseWheelZoomModifier |
Copy Code |
---|---|
var sciChartSurface = new SciChartSurface(); sciChartSurface.ChartModifier = new ModifierGroup(new MouseWheelZoomModifier()); |
Key Properties of the MouseWheelZoomModifier
The key Dependency Properties of the MouseWheelZoomModifier are listed below:
Key Properties of the MouseWheelZoomModifier |
Copy Code |
---|---|
/// <summary> /// The <see cref="MouseWheelZoomModifier"/> provides zooming (or shrinking) of the /// <see cref="SciChartSurface"/> on mouse wheel scroll /// Add to a <see cref="SciChartSurface"/> and set IsEnabled to true to enable /// this behaviour /// </summary> public class MouseWheelZoomModifier : RelativeZoomModifierBase { /// <summary> /// Defines the direction of the MouseWheelZoomModifier /// </summary> public XyDirection XyDirectionProperty = DependencyProperty.Register(...); /// <summary> /// Determines whether to Zoom or Pan when the <see cref="MouseWheelZoomModifier"/> /// executes. The default is Zoom /// </summary> public ActionType ActionTypeProperty = DependencyProperty.Register(...); // ... } |
Changing from Mousewheel Zoom to Pan
You can change the mode from Zoom to Pan with the MouseWheelZoomModifier.ActionType property.
Mousewheel Zooming or Panning in only one direction
You can change limit the direction of mouse-wheel zooming or panning with the MouseWheelZoomModifier.XyDirection property.
See Also