AUTHOR: Marin Bratanov
DATE POSTED: July 02, 2018
Pan the diagram canvas by clicking and dragging with the mouse only without using the keyboard.
By default, to pan RadDiagram, you must also hold down the Ctrl key.
To let the user pan immediately, set the Pannable.Key setting to None.
It is important to note that panning and selecting are effectively the same gesture - dragging with the mouse or a finger/stylus. This is the reason why a key modifier is required, without it the diagram cannot know the user intent because the action is ambiguous.
This means that the Pannable.Key and Selectable.Key must be different.
On mobile devices where a keyboard is not available the diagram cannot tell the gestures apart and so it pans on dragging and selects on tap upon an element (like a shape) automatically.
Here is an example:
<
telerik:RadDiagram
runat
=
"server"
ID
"RadDiagram1"
>
PannableSettings Key="None" />
Key
"None"
/>
ShapesCollection
telerik:DiagramShape
Id
"DiagramShape1"
Width
"100"
Height
"70"
X
"260"
Y
Type
"rectangle"
ContentSettings
Text
"Parent"
FillSettings
Color
"#25a0da"
</
"DiagramShape2"
"60"
"250"
"circle"
"Child 1"
"#FFBE33"
"DiagramShape3"
"245"
"Child 2"
"DiagramShape4"
"440"
"Child 3"
ConnectionsCollection
telerik:DiagramConnection
StartCap
"FilledCircle"
EndCap
"ArrowEnd"
FromSettings
Connector
"Bottom"
ShapeId
ToSettings
"Top"
Resources Buy Try