Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AnnotationAlignment - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AnnotationAlignment

    Specifies how the diagram elements must be aligned based on its immediate parent.

    Inheritance
    System.Object
    AnnotationAlignment
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class AnnotationAlignment : Enum
    Remarks
    To know more about using annotation alignment, refer to these links DiagramConnectorAnnotation
    To apply annotation alignment to a connector, use the below code.
    Examples
    <SfDiagram Height="600px" Connectors="@ConnectorCollection">
    </SfDiagram>
    @code
    {
       //Defines diagram's connector collection
       public ObservableCollection<DiagramConnector> ConnectorCollection { get; set; }
       protected override void OnInitialized()
       {
           ConnectorCollection = new ObservableCollection<DiagramConnector>();
           DiagramConnector Connector = new DiagramConnector()
           {
               SourcePoint = new ConnectorSourcePoint() { X = 300, Y = 40 },
               TargetPoint = new ConnectorTargetPoint() { X = 400, Y = 160 },
               Type = Segments.Orthogonal,
               Style = new ConnectorShapeStyle() { StrokeColor = "#6BA5D7" },
               Annotations = new ObservableCollection<DiagramConnectorAnnotation>()
               {
                  new DiagramConnectorAnnotation() { Content = "Before",Alignment=AnnotationAlignment.Before },
                   new DiagramConnectorAnnotation() { Content = "After",Alignment=AnnotationAlignment.After },
               }
           };
           ConnectorCollection.Add(Connector);
       }
    }

    Fields

    After

    Annotation placed bottom to the connector segment.

    Declaration
    public const AnnotationAlignment After
    Field Value
    Type Description
    AnnotationAlignment

    Before

    Annotation placed top of the connector segment.

    Declaration
    public const AnnotationAlignment Before
    Field Value
    Type Description
    AnnotationAlignment

    Center

    Annotation placed over the connector segment.

    Declaration
    public const AnnotationAlignment Center
    Field Value
    Type Description
    AnnotationAlignment

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved