alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class UmlEnumeration

    Represents a UML enumeration classifier.

    Inheritance
    object
    DiagramObject
    UmlEnumeration
    Implements
    IDiagramObject
    ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(string, object, object, IDiagramObject)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.Diagram.dll
    Syntax
    public class UmlEnumeration : DiagramObject, IDiagramObject, ICloneable
    Remarks

    An enumeration contains a name and a collection of members (literals), with optional styling and header configuration.

    The appearance and behavior of the members section can be customized using MemberHeaderSettings, including header styling and expand/collapse functionality.

    Examples
    nodes.Add(new Node()
    {
        ID = "enumNode",
        OffsetX = 400,
        OffsetY = 200,
        Width = 200,
        Height = 200,
        Style = new ShapeStyle() { Fill = "lightyellow" },
        Shape = new UmlClassifierShape()
        {
            Classifier = ClassifierShape.Enumeration,
            EnumerationShape = new UmlEnumeration()
            {
                Name = "Direction",
                Members = new DiagramObjectCollection<UmlEnumerationMember>()
                {
                    new UmlEnumerationMember() { Name = "North" },
                    new UmlEnumerationMember() { Name = "South" },
                    new UmlEnumerationMember() { Name = "East" },
                    new UmlEnumerationMember() { Name = "West" }
                }
            }
        }
    });

    Constructors

    UmlEnumeration()

    Creates a new instance of the UmlEnumeration.

    Declaration
    public UmlEnumeration()

    UmlEnumeration(UmlEnumeration)

    Creates a new instance of the UmlEnumeration.

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

    The source UmlEnumeration to copy.

    Properties

    MemberHeaderSettings

    Gets or sets the configuration of the Members section header.

    Declaration
    public UmlSectionHeaderSettings MemberHeaderSettings { get; set; }
    Property Value
    Type Description
    UmlSectionHeaderSettings

    A UmlSectionHeaderSettings representing the configuration of the members header.

    Remarks

    Allows customization of the section, including:

    • Header text (e.g., "Members")
    • Style
    • Visibility of add/remove actions
    • Expand/collapse behavior
    Examples

    This example demonstrates customizing the members section header:

    EnumerationShape = new UmlEnumeration()
    {
        Name = "Direction",
        MemberHeaderSettings = new UmlSectionHeaderSettings()
        {
            HeaderText = "Values",
            ShowExpandCollapseIcon = true,
            IsExpanded = true
        }
    }

    Members

    Gets or sets the collection of members (literals) of the UML enumeration.

    Declaration
    [JsonPropertyName("members")]
    public DiagramObjectCollection<UmlEnumerationMember> Members { get; set; }
    Property Value
    Type Description
    DiagramObjectCollection<UmlEnumerationMember>

    A collection of UmlEnumerationMember objects representing the enumeration values. Each member can define a name, optional styling, or act as a separator for visual grouping.

    Examples

    This example demonstrates adding members to an enumeration:

    nodes.Add(new Node()
    {
        ID = "enumNode",
        OffsetX = 300,
        OffsetY = 200,
        Shape = new UmlClassifierShape()
        {
            Classifier = ClassifierShape.Enumeration,
            EnumerationShape = new UmlEnumeration()
            {
                Name = "Priority",
                Members = new DiagramObjectCollection<UmlEnumerationMember>()
                {
                    new UmlEnumerationMember() { Name = "High" },
                    new UmlEnumerationMember() { Name = "Medium" },
                    new UmlEnumerationMember() { Name = "Low" }
                }
            }
        }
    });

    Name

    Gets or sets the name of the UML enumeration.

    Declaration
    [JsonPropertyName("name")]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    A string that represents the identifier of the enumeration, displayed in the classifier header.

    Examples

    This example demonstrates defining an enumeration name:

    EnumerationShape = new UmlEnumeration()
    {
        Name = "Status"
    }

    Methods

    Clone()

    Creates a new object that is a copy of the current UmlEnumeration.

    Declaration
    public override object Clone()
    Returns
    Type Description
    object

    A new UmlEnumeration instance that is a deep copy of the current object.

    Overrides
    DiagramObject.Clone()
    Remarks

    This method performs a deep copy, creating an independent instance with identical enumeration name, members, and styling.

    Implements

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