Editing
RadDiagram gives you the ability to edit the content of its items. You can double-click items in order to edit them or use RadDiagramCommand.
Enable/Disable Editing
By default, the RadDiagramItems are enabled for editing. In order to disable this functionality, you can use the IsEditable property:
Figure 1: IsEditable
Start Editing By Using Keyboard
Once the edit behavior is enabled, you can start the editing process by selecting the item and pressing the F2 key.
Controlling Editing in Code Behind
In order to start/end editing a RadDiagramItem, you can set IsInEditMode property to true/false.
RadDiagramItem also provides four editing events:
PreviewBeginEdit: fires when a RadDiagramItem is about to be edited. It is cancelable.
BeginEdit: fires when a RadDiagramItem has just entered in edit mode. In the code snippet below it is demonstrated how to access the editor element:
Access editor element
PreviewEndEdit: fires when a RadDiagramItem is about to leave the edit mode. It is cancelable.
EndEdit: fires when a RadDiagramItem has just left the edit mode.
Edit using Commands
RadDiagram provides three predefined commands for editing the selected item - BeginEdit, CommitEdit and CancelEdit.
Figure 2: Editing by commands