Skip to main content

XYDiagram2D.CanZoomIn() Method

Checks whether it is possible to zoom in to a diagram.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

Declaration

public bool CanZoomIn()

Returns

Type Description
Boolean

true if it is allowed to zoom in; otherwise, false.

Remarks

The following code changes the cursor’s appearance when the chart is displayed at the maximum zoom level:

private void chartControl1_QueryChartCursor(object sender, QueryChartCursorEventArgs e) {
    ChartControl chart = (ChartControl)sender;
        XYDiagram2D diagram = (XYDiagram2D)chart.Diagram;
            if (!diagram.CanZoomIn()) {
                e.Cursor = Cursors.None;
                e.CursorImage = new BitmapImage(new Uri(@"/CustomCursor;component/mycursor.png", UriKind.Relative));
    }
}

To zoom in to a diagram, use the XYDiagram2D.ZoomIn method.

See Also