A RoutedCommand provides the signaling mechanism that indicates that a particular action is required; it is simply a messaging mechanism and does not perform the actions for the command. Routed commands can be triggered on an element through gestures attached to a command, through an InputBinding on a specific element, or explicitly (invoked directly).
The following table provides a list of the commands that are exposed through the static DataGridCommands class:
| Command | Description |
|---|---|
| BeginEdit | Requests that the Row enters Edit mode. By default, this is associated with the F2 key. |
| CancelEdit | Requests that the Row exit Edit mode and that any changes be discarded. By default, this is associated with the Escape key. |
| CollapseDetails | Requests that the associated detail and its possible child details be collapsed. By default, this is associated with the Left arrow key. |
| CollapseGroup | Requests that the associated Group be collapsed. By default, this is associated with the Left arrow key. |
| EndEdit | Requests that the Row exits Edit mode. By default, this is associated with the Enter key. |
| ExpandDetails | Requests that the associated detail and its possible child details be expanded. By default, this is associated with the Right arrow key. |
| ExpandGroup | Requests that the associated Group be expanded. By default, this is associated with the Right arrow key. |
| ToggleDetailExpansion | Requests that the associated detail and its possible child details be collapsed if the root detail is expanded, and expanded if the root detail is collapsed. By default, this is associated with the Space bar or to double-clicking with the left mouse button. |
| ToggleGroupExpansion | Requests that the associated Group be collapsed if it is expanded, and expanded if it is collapsed. By default, this is associated with the Space bar or to double-clicking with the left mouse button. |