Rotate Command in WPF Diagram (SfDiagram)

5 May 20211 minute to read

The Rotate Command is used to rotate the elements in diagram. The RotateParameter is used to represent RotationDirection and Angle to rotate the element in diagram.

<Syncfusion:RotateParameter RotationDirection="Clockwise" Angle="45"  x:Key="RotateCommandParameter"/>

<Button Height="50" Content="Rotate" Name="RotateCommand" Command="Syncfusion:DiagramCommands.Rotate" CommandParameter="{StaticResource RotateCommandParameter }"></Button>
IGraphInfo graphinfo = diagramcontrol.Info as IGraphInfo;
graphinfo.Commands.Rotate.Execute(new RotateParameter() 

Gif for Rotate command

View sample in GitHub