Back to Devexpress

DiagramControl.SelectedStencils Property

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-6744f669.md

latest6.9 KB
Original Source

DiagramControl.SelectedStencils Property

This property is obsolete. Use the DiagramOptionsBehavior.SelectedStencils property instead.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public StencilCollection SelectedStencils { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Property SelectedStencils As StencilCollection

Property Value

Type
DevExpress.Diagram.Core.StencilCollection

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.

winforms-diagram-create-custom-shapes-with-connection-points/CS/XtraDiagram.CreateCustomShapes/Form1.cs#L20

csharp
RegisterCustomShapes();
    this.diagramControl1.SelectedStencils = new StencilCollection(new string[] { "CustomShapes" });
}

diagramcontrol-how-to-create-custom-shapes-with-connection-points-using-xaml-markup-t381372/CS/XtraDiagram.CreateCustomShapesXaml/Form1.cs#L18

csharp
RegisterCustomShapes();
    this.diagramControl1.SelectedStencils = new StencilCollection(new string[] { "CustomShapes" });
}

how-to-handle-diagramcontrol-events-to-save-diagrams-to-a-database-instead-of-a-file-system-t360920/CS/XtraDiagram.CustomDiagramStorage/DiagramStorageInitializer.cs#L26

csharp
continue;
diagram.SelectedStencils = new StencilCollection(new string[] {
DiagramToolboxRegistrator.Stencils.ElementAt(i).Id

how-to-create-custom-diagram-containers-and-register-them-in-the-toolbox-and-ribbon-gallery-t466447/CS/XtraDiagram.CreateCustomContainers/Form1.cs#L29

csharp
diagramControl1.OptionsBehavior.Stencils = new DiagramStencilCollection(DiagramToolboxRegistrator.Stencils.Concat(new[] { customContainersStencil }));
    diagramControl1.SelectedStencils = new StencilCollection(MyContainersStencilName, BasicShapes.StencilId);
}

winforms-diagram-use-custom-functions-in-shape-templates/CS/WindowsFormsApp4/Form1.cs#L20

csharp
diagramControl1.SelectedStencils = new StencilCollection() { "CustomStencil" };
}

winforms-diagram-create-custom-shapes-with-connection-points/VB/XtraDiagram.CreateCustomShapes/Form1.vb#L22

vb
RegisterCustomShapes()
    Me.diagramControl1.SelectedStencils = New StencilCollection(New String() {"CustomShapes"})
End Sub

diagramcontrol-how-to-create-custom-shapes-with-connection-points-using-xaml-markup-t381372/VB/XtraDiagram.CreateCustomShapesXaml/Form1.vb#L20

vb
RegisterCustomShapes()
    Me.diagramControl1.SelectedStencils = New StencilCollection(New String() { "CustomShapes" })
End Sub

how-to-handle-diagramcontrol-events-to-save-diagrams-to-a-database-instead-of-a-file-system-t360920/VB/XtraDiagram.CustomDiagramStorage/DiagramStorageInitializer.vb#L18

vb
If i = 0 Then Continue For
diagram.SelectedStencils = New StencilCollection(New String() {Enumerable.ElementAt(DiagramToolboxRegistrator.Stencils, i).Id})
Using stream = New MemoryStream()

how-to-create-custom-diagram-containers-and-register-them-in-the-toolbox-and-ribbon-gallery-t466447/VB/XtraDiagram.CreateCustomContainers/Form1.vb#L29

vb
diagramControl1.OptionsBehavior.Stencils = New DiagramStencilCollection(DiagramToolboxRegistrator.Stencils.Concat({customContainersStencil}))
    diagramControl1.SelectedStencils = New StencilCollection(MyContainersStencilName, BasicShapes.StencilId)
End Sub

winforms-diagram-use-custom-functions-in-shape-templates/VB/WindowsFormsApp4/Form1.vb#L22

vb
DiagramToolboxRegistrator.RegisterStencil(stencil)
    diagramControl1.SelectedStencils = New StencilCollection() From {"CustomStencil"}
End Sub

See Also

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace