alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Enum TextAlign

    Represents the alignment of the text inside the text block.

    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public enum TextAlign
    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 annotation collection
        Annotations = new DiagramObjectCollection<ShapeAnnotation>() 
        { 
            new ShapeAnnotation 
            { 
                Content = "Node",
                ID = "Annotation",
                 Style= new TextStyle()
                 {
                    TextAlign = TextAlign.Center,
                 }
            }
        },
    };

    Fields

    Name Description
    Center

    Sets the alignment of the text at the center of the text block .

    Justify

    Sets the alignment of the text in respective to left and right margins.

    Left

    Sets the alignment of the text to the left in the text block.

    Right

    Sets the alignment of the text to the right in the text block.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved