wpf-devexpress-dot-xpf-dot-diagram-dot-diagramcontrol-7d43ae1a.md
Specifies the selected shape groups. This is a dependency property.
Namespace : DevExpress.Xpf.Diagram
Assembly : DevExpress.Xpf.Diagram.v25.2.dll
NuGet Package : DevExpress.Wpf.Diagram
public StencilCollection SelectedStencils { get; set; }
Public Property SelectedStencils As StencilCollection
| Type | Description |
|---|---|
| DevExpress.Diagram.Core.StencilCollection |
A DevExpress.Diagram.Core.StencilCollection object.
|
The Shapes Panel displays available shape groups within the dropdown menu that is invoked by selecting the More Shapes item. End-users can select groups from the menu to display them within the Shapes panel. The selected groups are stored in the SelectedStencils collection.
The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectedStencils property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
ZoomFactor="0.73"
SelectedStencils="BasicShapes,ArrowShapes" />
</Grid>
wpf-diagram-bind-item-positions-to-source-objects/CS/dxSample/MainWindow.xaml#L16
<Grid>
<dxdiag:DiagramDesignerControl SelectedStencils="BasicShapes, BasicFlowchartShapes">
<dxmvvm:Interaction.Behaviors>
<dxdiag:DiagramOrgChartBehavior.TemplateDiagram>
<dxdiag:DiagramControl CanvasSizeMode="Fill" SelectedStencils="TemplateDesigner, BasicShapes" ShowPageBreaks="false" ShowRulers="false" ShowGrid="false">
<dxdiag:DiagramContainer Anchors="Left, Top" CanCopyWithoutParent="True" ConnectionPoints="0.5,0 1,0.5 0.5,1 0,0.5" CanAddItems="False" DragMode="ByAnyPoint" Height="190" ItemsCanChangeParent="False" ItemsCanAttachConnectorEndPoint="False" ItemsCanAttachConnectorBeginPoint="False" ItemsCanSelect="False" ItemsCanEdit="False" ItemsCanCopyWithoutParent="False" ItemsCanMove="False" ItemsCanRotate="False" ItemsCanSnapToOtherItems="False" ItemsCanDeleteWithoutParent="False" ItemsCanSnapToThisItem="False" ItemsCanResize="False" Padding="1" Position="-25,150" Shape="StandardContainers.Plain" ThemeStyleId="ShapeId.Moderate5" Width="322">
wpf-diagram-custom-context-menu/CS/WpfApp7/MainWindow.xaml#L16
<Grid>
<local:DiagramDesignerControlEx SelectedStencils="BasicShapes">
<dxdiag:DiagramShape Height="75"
wpf-diagram-track-and-restrict-drag-actions/CS/WpfApp7/MainWindow.xaml#L18
x:Name="diagramControl1"
SelectedStencils="BasicShapes"
AddingNewItem="DiagramDesignerControl_AddingNewItem"
diagramControl.Stencils = new DiagramStencilCollection(DiagramToolboxRegistrator.Stencils.Concat(new[] { customContainersStencil }));
diagramControl.SelectedStencils = new StencilCollection(MyContainersStencilName, BasicShapes.StencilId);
}
wpf-diagramcontrol-create-items-with-custom-content/CS/DXDiagram.ContentItem/MainWindow.xaml.cs#L52
diagramControl.DocumentSource = "DiagramData.xml";
diagramControl.SelectedStencils = new StencilCollection(new string[] { "CustomTools" });
}
See Also