Class DiagramCommands
Represents a class to specify all commands of the diagram control.
Inheritance
Namespace: Syncfusion.UI.Xaml.Diagram
Assembly: Syncfusion.SfDiagram.WPF.dll
Syntax
public static class DiagramCommands : Object
Properties
AlignBottom
Gets or sets the AlignBottom command to invoke when to align all selected objects along the bottom surface of the reference object.
Declaration
public static ICommand AlignBottom { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AlignCenter
Gets or sets the AlignCenter command to invoke when to align center all selected objects vertically. It aligns selected objects to the center with respect to the horizontal axis by changing the x-coordinate of the object.
Declaration
public static ICommand AlignCenter { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AlignLeft
Gets or sets the AlignLeft command to invoke when to align all selected objects along the left corner of the reference object.
Declaration
public static ICommand AlignLeft { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AlignMiddle
Gets or sets the AlignMiddle command to invoke when to align center all selected objects horizontally. It aligns selected objects to the center with respect to the vertical axis by changing the y-coordinate of the object.
Declaration
public static ICommand AlignMiddle { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AlignRight
Gets or sets the AlignRight command to invoke when to align all selected objects along the right corner of the reference object.
Declaration
public static ICommand AlignRight { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AlignTop
Gets or sets the AlignTop command to invoke when to align all selected objects along the top surface of the reference object.
Declaration
public static ICommand AlignTop { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
BringForward
Gets or sets the BringForward command, to moves the selected element over the nearest overlapping element.
Declaration
public static ICommand BringForward { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
BringToFront
Gets or sets the BringToFront command, to visually brings the selected element to the front over all other overlapped elements.
Declaration
public static ICommand BringToFront { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Cancel
Gets or sets the Cancel command of the DiagramCommands which will cancel the currently performing action in diagram.
Declaration
public static ICommand Cancel { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Remarks
Currently this command will cancel the following actions
1. Stop the annotation editing and accept the curent value.
2. Reset the diagram tool to select tool
3. Clear the selection of diagram elements
4. Clear the keyboard focus
Examples
Below example shows how to execute the Cancel command
<Syncfusion:SfDiagram x:Name="Diagram" />
<!--Initialize the Button to Execute Cancel command-->
<Button x:Name="Cancel" Content="Cancel" Height="40" Width="130" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ElementName=Diagram,Path=Info.Commands.Cancel}"/>
Copy
Gets or sets the Copy command, to copy the selected elements in the diagram.
Declaration
public static ICommand Copy { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Cut
Gets or sets the Cut command, to cut the selected elements in the diagram.
Declaration
public static ICommand Cut { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Delete
Gets or sets the Delete command invokes to delete the elements in the diagram.
Declaration
public static ICommand Delete { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Draw
Gets or sets the Draw command invokes to draw the elements in the diagram.
Declaration
public static ICommand Draw { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Duplicate
Gets or sets the Duplicate command invokes when the element is duplicated.
Declaration
public static ICommand Duplicate { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
EditAnnotation
Gets or sets the EditAnnotation command of the DiagramCommands which will enble annotation editing mode of the first selected diagram element.
Declaration
public static ICommand EditAnnotation { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Examples
Below example shows how to execute the EditAnnotation command.
<Syncfusion:SfDiagram x:Name="Diagram" />
<!--Initialize the Button to Execute Edit command-->
<Button x:Name="Edit" Content="EditAnnotation" Height="40" Width="130" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ElementName=Diagram,Path=Info.Commands.EditAnnotation}"/>
ExpandCollapse
Gets or sets the ExpandCollapse command invokes when the child elements are going to expand or collapse.
Declaration
public static ICommand ExpandCollapse { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
FitToPage
Gets or sets the FitToPage command invokes to bring the entire Diagram into the view.
Declaration
public static ICommand FitToPage { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Flip
Gets or sets the Flip command invokes to be mirrored the elements horizontally, vertically, or both.
Declaration
public static ICommand Flip { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
FocusToNextItem
Gets or sets the FocusToNextItem command invokes when the keyboard tab key is pressed.
Declaration
public static ICommand FocusToNextItem { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
FocusToPreviousItem
Gets or sets the FocusToPreviousItem command invokes when the keyboard tab with shift key is pressed.
Declaration
public static ICommand FocusToPreviousItem { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Group
Gets or sets the Group command to invoke when groups the selected elements.
Declaration
public static ICommand Group { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
InvalidateLayout
Gets or sets the InvalidateLayout command invokes when Invalidates the arrange state (layout) for the element.
Declaration
public static ICommand InvalidateLayout { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MoveDown
Gets or sets the MoveDown command, to move the selected elements downwards in the diagram.
Declaration
public static ICommand MoveDown { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MoveLeft
Gets or sets the MoveLeft command, to move the selected elements left side in the diagram.
Declaration
public static ICommand MoveLeft { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MoveRight
Gets or sets the MoveRight command, to move the selected elements right side in the diagram.
Declaration
public static ICommand MoveRight { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MoveUp
Gets or sets the MoveUp command, to move the selected elements upwards in the diagram.
Declaration
public static ICommand MoveUp { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Paste
Gets or sets the Paste command, to paste the copied elements in the diagram.
Declaration
public static ICommand Paste { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Redo
Gets or sets the Redo command to invoke when perform the redo action in Diagram.
Declaration
public static ICommand Redo { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Reset
Gets or sets the reset command to invoke when reset horizontal Offset, vertical Offset, and zoom level of the diagram.
Declaration
public static ICommand Reset { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Rotate
Gets or sets the Rotate command to rotate the selected object.
Declaration
public static ICommand Rotate { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SameHeight
Gets or sets the SameHeight command to invoke when vertically scales the selected items to the height of first selected object
Declaration
public static ICommand SameHeight { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SameSize
Gets or sets the SameSize command to invoke when scales the selected items to the size of first selected object.
Declaration
public static ICommand SameSize { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SameWidth
Gets or sets the SameWidth command to invoke when horizontally scales the selected items to the width of first selected object
Declaration
public static ICommand SameWidth { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SelectAll
Gets or sets the SelectAll command to invoke when to select all the elements in the diagram.
Declaration
public static ICommand SelectAll { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SelectByType
Gets or sets the SelectByType command to select the specified type of objects in the diagram.
Declaration
public static ICommand SelectByType { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SelectFocusedItem
Gets or sets the SelectFocusedItem command invokes when the keyboard enter is pressed.
Declaration
public static ICommand SelectFocusedItem { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SelectTool
Gets or sets the SelectTool command of the DrawingTool which will change the SelectTool and Tool properties to specified values.
Declaration
public static ICommand SelectTool { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Remarks
This command will receive SelectToolCommandParameter as command which contains the Tool, DrawingTool and ConnectorType informations to enable drawing tool option in diagram.
Examples
Below example shows how to execute the SelectTool command and provide SelectToolCommandParameter value for the command using click event.
<Syncfusion:SelectToolCommandParameter DrawingTool="Ellipse" Tool="ContinuesDraw" x:Key="SelectToolEllipseCommandParameter"/>
<Syncfusion:SelectToolCommandParameter DrawingTool=" Connector" Tool="ContinuesDraw" ConnectorType =” Connector” x:Key="SelectToolConnectorCommandParameter"/>
<Syncfusion:SfDiagram x:Name="Diagram" />
<!--Initialize the Button to Execute SelectTool command for enable EllipseTool -->
<Button x:Name="EllipseTool" Content="Rotate ClockWise" Height="40" Width="130" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ElementName=Diagram,Path=Info.Commands. SelectTool}" CommandParameter="{StaticResource SelectToolEllipseCommandParameter}"/>
<!--Initialize the Button to Execute SelectTool command for enable Connector Tool-->
<Button x:Name="ConnectorTool" Content="ConnectorTool" Height="40" Width="130" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ElementName=Diagram,Path=Info.Commands. SelectTool}" CommandParameter="{StaticResource SelectToolConnectorCommandParameter }"/>
SendBackward
Gets or sets the SendBackward command, to visually moves the selected elements behind the underlying element.
Declaration
public static ICommand SendBackward { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SendToBack
Gets or sets the SendToBack command, to visually moves the selected elements behind all the other overlapped elements.
Declaration
public static ICommand SendToBack { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SetShapeStyle
Gets or sets the ShapeStyle command to apply the specified style to the selected objects in the diagram.
Declaration
public static ICommand SetShapeStyle { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SpaceAcross
Gets or sets the SpaceAcross command, to equally spaces the selected nodes horizontally.
Declaration
public static ICommand SpaceAcross { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SpaceDown
Gets or sets the SpaceDown command, to equally spaces the selected nodes vertically.
Declaration
public static ICommand SpaceDown { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ToggleBold
Gets or sets the Bold command to apply the specified style to the selected objects in the diagram.
Declaration
public static ICommand ToggleBold { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ToggleItalic
Gets or sets the Italic command to apply the specified style to the selected objects in the diagram.
Declaration
public static ICommand ToggleItalic { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ToggleStrikeThrough
Gets or sets the StrikeThrough command to apply the specified style to the selected objects in the diagram.
Declaration
public static ICommand ToggleStrikeThrough { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ToggleUnderline
Gets or sets the Underline command to apply the specified style to the selected objects in the diagram.
Declaration
public static ICommand ToggleUnderline { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Undo
Gets or sets the undo command to invoke when history of the diagram is changed.
Declaration
public static ICommand Undo { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
UnGroup
Gets or sets the UnGroup command to invoke when ungroups the selected elements.
Declaration
public static ICommand UnGroup { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Zoom
Gets or sets the zoom command to invoke when zoom-in and zoom-out the diagram view.
Declaration
public static ICommand Zoom { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |