Class TextShape
Represents the TextShape class which allows the user to draw nodes in the diagram with a shape based on text as per user preference.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class TextShape : Shape, IDiagramObject, ICloneable
Remarks
This class is beneficial for scenarios where a textual representation within the node is required.
Examples
Node builtInNode = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Shape = new TextShape()
{
Content="Text Content"
}
};
Constructors
TextShape()
Initializes a new instance of the TextShape class.
Declaration
public TextShape()
TextShape(TextShape)
Initializes a new instance of the TextShape class from an existing instance.
Declaration
public TextShape(TextShape src)
Parameters
Type | Name | Description |
---|---|---|
TextShape | src | An instance of TextShape to copy. |
Properties
Content
Gets or sets the content to be displayed as a Text Node.
Declaration
public string Content { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the content displayed in the node. Default is null. |
Remarks
This property is used to define the text that should be displayed within the node.
Examples
Node builtInNode = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Shape = new TextShape()
{
Content="Text Content"
}
};
Methods
Clone()
Creates a new shape that is a copy of the current Text shape.
Declaration
public override object Clone()
Returns
Type |
---|
System.Object |
Overrides
Implements
System.ICloneable