Skip to main content
A newer version of this page is available. .

DiagramShape Class

Displays a shape on the diagram canvas.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v18.1.dll

Declaration

public class DiagramShape :
    DiagramItem,
    IDiagramShape,
    IDiagramShapeBase,
    IDiagramItem

Remarks

Use the following properties to initialize a shape’s main settings.

You can link two shapes with a DiagramConnector, using the DiagramConnector.BeginItem, DiagramConnector.EndItem, DiagramConnector.BeginItemPointIndex and DiagramConnector.EndItemPointIndex properties.

For more information on shapes, see the Diagram Items topic.

Example

The following code assigns the DevExpress.Diagram.Core.BasicFlowchartShapes.Decision shape kind to a shape and specifies the shape text and size.

DiagramShape-Shape

diagramShape1.Shape = DevExpress.Diagram.Core.BasicFlowchartShapes.Decision;
diagramShape1.Content = "Initialized?";
diagramShape1.Size = new Size(150, 60);

The following code snippets (auto-collected from DevExpress Examples) contain references to the DiagramShape class.

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.

See Also