You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

DiagramControl.Stencils Property

Provides access to the collection of available stencils. This is a dependency property.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v20.2.dll

Declaration

[Browsable(false)]
public DiagramStencilCollection Stencils { get; set; }
<Browsable(False)>
Public Property Stencils As DiagramStencilCollection

Property Value

Type Description
DevExpress.Diagram.Core.DiagramStencilCollection

A DevExpress.Diagram.Core.DiagramStencilCollection object that is the collection of available stencils.

Remarks

Use the Stencils property to register new or remove the default stencils.

See the example below.

var svgStencil = new DiagramStencil("SVGStencilId", "SVGStencilName");
using(var svgStream = File.OpenRead("Shape.svg")) {
    var svgShape = ShapeDescription.CreateSvgShape("SVGShapeId", "SVGShapeName", svgStream);
    svgStencil.RegisterShape(svgShape);
}
diagramControl.Stencils = new DiagramStencilCollection(svgStencil, BasicShapes.Stencil);

If the Stencils property is set to null, the diagram toolbox loads its stencils from the DiagramToolboxRegistrator.Stencils static collection.

Implements

DevExpress.Diagram.Core.IDiagramControl.Stencils
See Also