menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextShape - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextShape

    Represents the TextShape allows the user to draw node in the diagram with the shape of text based on the user’s preference

    Inheritance
    System.Object
    DiagramObject
    Shape
    TextShape
    Implements
    IDiagramObject
    System.ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(String, Object, Object, IDiagramObject)
    Shape.Type
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class TextShape : Shape, IDiagramObject, ICloneable
    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.

    Declaration
    public TextShape()

    TextShape(TextShape)

    Creates a new instance of the TextShape from the given TextShape.

    Declaration
    public TextShape(TextShape src)
    Parameters
    Type Name Description
    TextShape src

    BasicShape

    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

    Property Content represents the content to be displayed as a TextNode

    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 Description
    System.Object

    it returns TextShape

    Overrides
    Shape.Clone()

    Implements

    IDiagramObject
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved