Changing Cursor on ZoomIn Scroll Enabled

2 posts, 0 answers
  1. Jake
    Jake avatar
    7 posts
    Member since:
    Sep 2011

    Posted 27 Oct 2011 Link to this post

    Is it possible to change the mouse cursor inside the ChartArea when zooming in scrolling is enabled?
  2. Yavor
    Yavor avatar
    401 posts

    Posted 01 Nov 2011 Link to this post

    Hi Jake,

    When you have enabled zooming & scrolling on your chart area it automatically changes its cursor to Hand to hint the user he can zoom using the selection rectangle. You can disable this selection rectangle by finding the DragZoomLayerControl, responsible for zooming & scrolling functionality, and disable its interactivity like this:

    void chartArea_Loaded(object sender, RoutedEventArgs e)
        var dragZoomLayer = chart1.ChildrenOfType<DragZoomLayerControl>().Single();
        dragZoomLayer.IsInteractive = false; // disable selection rectangle
    The method ChildrenOfType is an extension method defined in the Telerik.Windows.Controls namespace so make sure you add a using statement.

    You can also change the cursor of the series by specifying a new cursor in the Appearance property of the series definition like this:
            <telerik:SeriesAppearanceSettings Cursor="None" />

    I have created a small sample application that demonstrates this approach. Please take a look at it and tell me how it is.

    Best wishes,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top