I already answered to this question in your support ticket. However, I will also post the same answer in this forum thread so that others from the community will be able to find it.
This behavior is not supported out-of-the-box. However, in order to achieve your requirement, you can use the IHitTestService
. This service is called on each MouseDown
event. Hence, if the diagram doesn't know that there is an item under the mouse (when you want to pan) the control will start pan operation otherwise (if the control knows that there is a shape under the mouse) it will start drag operation. You can do this by subscribing to the PreviewMouseLeftButtonDown
event of the RadDiagram
control and setting the ItemUnderMouse
property of the service to return null
Furthermore, in order to allow the dragging of items when the CTRL key is not pressed you will have to set back the default service. This can be done in the MouseUp
event handler of the RadDiagram
For your convenience we implemented this approach in the attached project. Please take a look at it and let us know if it works in your certain scenario.
On the other hand, the same functionality can be achieved by setting the IsEnabled
property of any item to False
. By doing so, you will be able to start panning on top of the that item and you will disable it (and its manipulations).
Pavel R. Pavlov
the Telerik team