Skip to main content

XYDiagram2D.NavigationOptions Property

Zoom and scroll settings for the XYDiagram2D.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.1.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public NavigationOptions NavigationOptions { get; set; }

Property Value

Type Description
NavigationOptions

A NavigationOptions object that contains zoom and scroll options.

Remarks

Set the XYDiagram2D.EnableAxisXNavigation or XYDiagram2D.EnableAxisYNavigation property to true to apply NavigationOptions settings to the diagram.

Use the NavigationOptions property to define whether users can utilize keyboard shortcuts, mouse operations, and touch gestures to zoom and scroll a chart:

<dxc:XYDiagram2D
        EnableAxisXNavigation="True"
        EnableAxisYNavigation="True">
    <dxc:XYDiagram2D.NavigationOptions>
        <dxc:NavigationOptions 
            UseKeyboard="True"
            UseScrollBars="True"
            UseMouse="True"
            UseTouchDevice="True"/>
    </dxc:XYDiagram2D.NavigationOptions>
</dxc:XYDiagram2D>

The NavigationOptions.AxisXMaxZoomPercent and NavigationOptions.AxisYMaxZoomPercent properties specify zoom limits. The default maximum is x100 (10,000%). When a user reaches the limit, the mouse pointer changes to ZoomingAndScrolling_Zooming04.png.

<dxc:XYDiagram2D
        EnableAxisXNavigation="True"
        EnableAxisYNavigation="True">
    <dxc:XYDiagram2D.NavigationOptions>
        <dxc:NavigationOptions 
            AxisXMaxZoomPercent="500" 
            AxisYMaxZoomPercent="500"/>
    </dxc:XYDiagram2D.NavigationOptions>
</dxc:XYDiagram2D>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NavigationOptions property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also