Panning and DragSelectingTool


In the documentation and in your sample I understand that setting dragselectingtool to null allow to perform the panning.

Well, in the real world I want to keep the both possibilities panning and dragselectingtool.

Probably the best way is to attach one function to “ctrl+click”

Where’s the best place to detect a ctrl+drag and then not perform a drag selection but a panning ?


Just customize your DragSelectingTool not to start if the control-key is down:

public class CustomDragSelectingTool : DragSelectingTool { public override bool CanStart() { if (IsControlKeyDown()) return false; return base.CanStart(); } }
and install with:

      myDiagram.DragSelectingTool = new CustomDragSelectingTool();

(or do the same initialization in XAML)