SelectByType Command in WPF Diagram (SfDiagram)

21 Sep 20231 minute to read

The SelectByType command is used to select the specified type (NodeViewModel,BpmnNodeViewModel,…) of elements in the diagram.

<Button Height="50" Content="SelectByType" Name="SelectByType" Command="Syncfusion:DiagramCommands.SelectByType" CommandParameter="{x:Type Syncfusion:NodeViewModel}"></Button>
IGraphInfo graphinfo = diagramcontrol.Info as IGraphInfo;
graphinfo.Commands.SelectByType.Execute(typeof(NodeViewModel));

Gif for SelectByType command

View sample in GitHub