This is a migrated thread and some comments may be shown as answers.

Pan without Ctrl being pressed?

3 Answers 175 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Kristoffer
Top achievements
Rank 1
Kristoffer asked on 10 Dec 2012, 11:45 AM
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

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Dec 2012, 01:45 PM
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,
Stefan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
navid
Top achievements
Rank 1
answered on 20 Aug 2017, 08:32 AM
Can panning by just right click of mouse?
0
Dinko | Tech Support Engineer
Telerik team
answered on 23 Aug 2017, 12:19 PM
Hello ,

The RadDiagram framework exposes extensibility points of its default tools, such as the PanningTool and the . 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.

Regards,
Dinko
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.
Tags
Diagram
Asked by
Kristoffer
Top achievements
Rank 1
Answers by
Stefan
Telerik team
navid
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or