menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AnnotationTypes - API Reference

    Show / Hide Table of Contents

    Class AnnotationTypes

    It allows the user to define the type of annotation.

    Inheritance
    System.Object
    AnnotationTypes
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class AnnotationTypes : Enum
    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
       <DiagramSnapSettings Constraints = "@snapConstraints" />
    </SfDiagram >
    @code
    {
       public ObservableCollection<DiagramNode> NodeCollection { get; set; }
       SnapConstraints snapConstraints;
       protected override void OnInitialized()
       {
           snapConstraints = SnapConstraints.None;
           NodeCollection = new ObservableCollection<DiagramNode>();
           DiagramNode Node = new DiagramNode()
           {
               Width = 100,
               Height = 100,
               OffsetX = 100,
               OffsetY = 100,
               Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" },
               Annotations = new ObservableCollection<DiagramNodeAnnotation>() {
                   /// A annotation is created and stored in Annotations collection of Node.
                    new DiagramNodeAnnotation() { Content = "Node" ,Type=  AnnotationTypes.Shape} }
           };
           NodeCollection.Add(Node);
       }
    }

    Fields

    Path

    Sets the annotation type as Shape.

    Declaration
    public const AnnotationTypes Path
    Field Value
    Type Description
    AnnotationTypes

    Shape

    Sets the annotation type as Path.

    Declaration
    public const AnnotationTypes Shape
    Field Value
    Type Description
    AnnotationTypes

    value__

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