Pan without Ctrl being pressed?

4 posts, 0 answers
  1. Kristoffer
    Kristoffer avatar
    30 posts
    Member since:
    Oct 2012

    Posted 10 Dec 2012 Link to this post

    IsPanEnabled="True" enables panning, but you need to hold down the Ctrl key. Is it possible to change this to the following?

    Panning: Simple click
    Selecting: Shift+click
  2. Stefan
    Stefan avatar
    89 posts

    Posted 12 Dec 2012 Link to this post

    Hi Kristoffer,

    If you want to pan without holding the Ctrl key you should make the RadDiagram's ActiveTool to be the PanTool.

    About the selection - if you want the selection to be activated when the Shift key is hold you should handle the RadDiagram's KeyDown event and to check if the hold key is Shift to activate the RadDiagram's PointerTool. Analogically - if you want to continue panning without the Ctrl key after the Shift is released you should handle the KeyUp event and implement the same logic to return the ActiveTool to PanTool.

    You can check the attached project to see the approach I described.
    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. navid
    navid avatar
    3 posts
    Member since:
    Apr 2017

    Posted 20 Aug in reply to Stefan Link to this post

    Can panning by just right click of mouse?
  4. Dinko
    Dinko avatar
    440 posts

    Posted 23 Aug Link to this post

    Hello navid,

    The RadDiagram framework exposes extensibility points of its default tools, such as the PanningTool and the PointerTool. You can take a look at the Tools Customization help article in our documentation where the tools are described. In your particular scenario, you can take advantage of those extensibility points. You can create custom behavior of those tools whenever user clicks with the right mouse button. 

    You can find sample project which demonstrates this approach attached to this reply.

    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top