Flip Command in WPF Diagram (SfDiagram)
21 Dec 20232 minutes to read
The Flip
command is used to mirror the selected object’s content and port in the diagram page in both horizontal and vertical direction.
<Button Height="50" Content="Flip" Name="Flip" Command="Syncfusion:DiagramCommands.Flip"></Button>
IGraphInfo graphinfo = Diagram.Info as IGraphInfo;
// Apply flip to selected objects.
graphinfo.Commands.Flip.Execute(null);
Flip parameter
The Flip parameter is used to customize the flip mode and flip direction. If the parameter is null, then the object will be flipped both horizontally and vertically.
Flip mode
The FlipMode is used to control the behaviour of the flip object.
FlipMode | Description |
---|---|
Content | It is used to enable or disables the flip for object’s content. |
Port | It is used to enable or disables the flip for object’s port. |
FlipMode | It is used to enable or disables the flip for both object’s content and port. |
None | It is used to disables all the flipmode behaviour. |
Flip
The Flip is used to specify the flip direction in flip command.
Flip | Description |
---|---|
Flip | It is used to flip the node or port is mirrored across the both horizontal and vertical axis. |
HorizontalFlip | It is used to flip the node or port is mirrored across the horizontal axis. |
VerticalFlip | It is used to flip the node or port is mirrored across the vertical axis. |
None | It is used to disables all the flip behaviour. |
Group Flip
When the Flip command is applied to the group, it enables the transformation of its content, including nodes, connectors, and ports, in accordance with their positions within the group, aligning with the specified flip direction.