windowsforms-devexpress-dot-xtradiagram-dot-options-dot-diagramoptionsbehavior-95440dee.md
Specifies the selected shape groups.
Namespace : DevExpress.XtraDiagram.Options
Assembly : DevExpress.XtraDiagram.v25.2.dll
NuGet Package : DevExpress.Win.Diagram
public virtual StencilCollection SelectedStencils { get; set; }
Public Overridable Property SelectedStencils As StencilCollection
| Type | Description |
|---|---|
| DevExpress.Diagram.Core.StencilCollection |
A DevExpress.Diagram.Core.StencilCollection object.
|
You can access this nested property as listed below:
| Object Type | Path to SelectedStencils |
|---|---|
| DiagramControl |
.OptionsBehavior .SelectedStencils
|
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 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.
DiagramToolboxRegistrator.RegisterStencil(stencil);
diagramControl1.OptionsBehavior.SelectedStencils = StencilCollection.Parse("customShapes");
}
winforms-diagram-register-factoryitemtools-for-shapes/CS/WindowsFormsApp4/Form1.cs#L21
diagramControl1.OptionsBehavior.SelectedStencils = new StencilCollection() { "CustomStencil" };
}
winforms-diagram-create-custom-shapes-based-on-diagram-containers/CS/WindowsFormsApp4/Form1.cs#L26
diagramControl1.OptionsBehavior.SelectedStencils = new StencilCollection() { "CustomStencil" };
}
winforms-diagram-track-and-restrict-drag-actions/CS/WinApp7/Form1.cs#L13
diagramControl1.CreateRibbon();
diagramControl1.OptionsBehavior.SelectedStencils = new StencilCollection() { "BasicShapes" };
DiagramToolboxRegistrator.RegisterStencil(stencil)
diagramControl1.OptionsBehavior.SelectedStencils = StencilCollection.Parse("customShapes")
End Sub
winforms-diagram-register-factoryitemtools-for-shapes/VB/WindowsFormsApp4/Form1.vb#L22
DiagramToolboxRegistrator.RegisterStencil(stencil)
diagramControl1.OptionsBehavior.SelectedStencils = New StencilCollection() From {"CustomStencil"}
End Sub
winforms-diagram-create-custom-shapes-based-on-diagram-containers/VB/WindowsFormsApp4/Form1.vb#L21
DiagramToolboxRegistrator.RegisterStencil(stencil)
diagramControl1.OptionsBehavior.SelectedStencils = New StencilCollection() From {"CustomStencil"}
End Sub
See Also