Enabling or Disabling Zoom ChartModifiers at runtime
You can enable or disable ChartModifiers at runtime via the IsEnabled property. Use the following to disable conflicting modifiers with some controls in your UI.
Enabling or Disabling Zoom ChartModifiers at runtime |
Copy Code
|
---|---|
<CheckBox x:Name="chkRubberBand" IsChecked="True" s:ToggleButtonExtensions.GroupName="zoomPan"/> <CheckBox x:Name="chkZoomPanModifier" IsChecked="True" s:ToggleButtonExtensions.GroupName="zoomPan"/> <!-- where xmlns:s="http://schemas.abtsoftware.co.uk/scichart" --> <s:SciChartSurface> <s:SciChartSurface.ChartModifier> <s:ModifierGroup> <s:RubberBandXyZoomModifier IsEnabled="{Binding ElementName=chkRubberBand, Path=IsChecked, Mode=TwoWay}"/> <s:ZoomPanModifier IsEnabled="{Binding ElementName=chkZoomPanModifier, Path=IsChecked, Mode=TwoWay}"/> </s:ModifierGroup> </s:SciChartSurface.ChartModifier> </s:SciChartSurface> |