CTRL + MouseScroll for Zoom, MouseScroll for Scrolling

2 posts, 1 answers
  1. Semih
    Semih avatar
    8 posts
    Member since:
    Aug 2014

    Posted 16 Dec 2014 Link to this post


    I want to scroll through the Diagram using MouseScroll and do the zoom operation by holding CTRL key and use mouse scroll up/down. By default MouseScroll  does the zoom operations. I want to perform zooming by holding a CTRL modifier and MouseScroll. Is this possible?

  2. Answer
    Milena avatar
    193 posts

    Posted 17 Dec 2014 Link to this post

    Hello Semih,

    Let me get straight to your questions. So, to achieve your requirements: 
    1) Zoom operation - you can subscribe to the diagram's PreviewZoom event and check if the Ctrl key is down, if not, you can cancel the zoom operation by setting the event arguments' Handled property to True.
    2) Scroll operation - you can use the diagram's MouseWheel event and change the diagram's Y position with the e.Delta. 

    For your convenience I implemented this approach in the attached project. Please take a look at it and let us know if it works for you


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
Back to Top