Scrolling with rad diagram

2 posts, 0 answers
  1. Atul
    Atul avatar
    1 posts
    Member since:
    Jan 2013

    Posted 26 Sep 2013 Link to this post

    Hello Team,
               i have problem  with  rad diagram, in my case ,when i am trying to mouse wheel in rad diagram, its get zoomed-in or zoomed-out
    now please suggest me, i want when user try scrolling in mouse wheel,only vertical scroll bar should be scroll instead of zoom-in  or zoomed-out.

    Thanks in advance....
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 01 Oct 2013 Link to this post

    Hello Atul,

    In order to achieve your requirement you need to restrict the Zooming feature, first. You can do this by subscribing to the PreviewZoom event of the RadDiagram and mark it as handled. Another way to do this is to set IsZoomEnabled property of the RadDiagram to False.

    Furthermore, you can subscribe to the MouseWheel event of the RadDiagram and manually scroll the diagram. You can do this with the following snippet:

    private void xDiagram_MouseWheel(object sender, MouseWheelEventArgs e)
    {
        var diagram = sender as RadDiagram;
        diagram.Scroll(0, e.Delta);
    }
     
    private void xDiagram_PreviewZoom(object sender, Telerik.Windows.Controls.Diagrams.DiagramZoomEventArgs e)
    {
        e.Handled = true;
    }
    I hope that this clarifies your concerns.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top