Back to Devexpress

DiagramShape Class

windowsforms-devexpress-dot-xtradiagram-87d38868.md

latest3.4 KB
Original Source

DiagramShape Class

Displays a shape on the diagram canvas.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public class DiagramShape :
    DiagramItem,
    IDiagramShape,
    IDiagramShapeBase,
    IDiagramItem
vb
Public Class DiagramShape
    Inherits DiagramItem
    Implements IDiagramShape,
               IDiagramShapeBase,
               IDiagramItem

The following members return DiagramShape objects:

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.

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

Inheritance

Object MarshalByRefObject Component DiagramItem DiagramShape

See Also

DiagramShape Members

DiagramConnector

DevExpress.XtraDiagram Namespace