Class ShapeAnnotation
Defines the textual description of nodes/connectors with respect to bounds Represents the block of text displayed over the node.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class ShapeAnnotation : Annotation, IDiagramObject, ICloneable
Examples
Node node = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
// Initialize the annotation collection
Annotations = new DiagramObjectCollection<ShapeAnnotation>() { new ShapeAnnotation { Content = "Node" }, Offset = new DiagramPoint() { X = 0, Y = 0 } },
};
Constructors
ShapeAnnotation()
Initializes a new instance of the ShapeAnnotation.
Declaration
public ShapeAnnotation()
ShapeAnnotation(ShapeAnnotation)
Creates a new instance of the ShapeAnnotation from the given ShapeAnnotation.
Declaration
public ShapeAnnotation(ShapeAnnotation src)
Parameters
Type | Name | Description |
---|---|---|
ShapeAnnotation | src | ShapeAnnotation |
Properties
Offset
Gets or sets the position of the annotation to its parent bounds.
Declaration
public DiagramPoint Offset { get; set; }
Property Value
Type |
---|
DiagramPoint |
Examples
Node node = new Node()
{
Annotations = new DiagramObjectCollection<ShapeAnnotation>() { new ShapeAnnotation { Content = "Node" }, Offset = new DiagramPoint() { X = 0, Y = 0 } },
};
Methods
Clone()
Creates a new annotation that is a copy of the current annotation.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | ShapeAnnotation |
Overrides
Implements
System.ICloneable