Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramUmlClass

    Show / Hide Table of Contents

    Class DiagramUmlClass

    Sets or gets the behavior of the Uml class shapes.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramUmlClass
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramUmlClass : SfDiagramBase
    Remarks

    Used to represent the static view of an application. The class diagrams are widely used in the modeling of object-oriented systems because they are the only UML diagrams that can be mapped directly with object-oriented languages. Diagram supports to generate the class diagram shapes from business logic. The following code demonstrates, how to define the DiagramUmlClass and its properties.

    Examples
    <SfDiagram Height="600px" Nodes="@NodeCollection">
    </SfDiagram>
    @code{
          // . . .
          Shape = new DiagramShape()
          {
            Type = Syncfusion.Blazor.Diagrams.Shapes.UmlClassifier,
            Classifier = ClassifierShape.Class,
            //Define class object
            ClassShape = new DiagramUmlClass()
            {
               Name = "Patient",
               //Define class attributes
               Attributes = new ObservableCollection<DiagramUmlClassAttribute>()
               {
                 new DiagramUmlClassAttribute() {Name = "accepted", Type = "Date"}
               },
               //Define class methods
               Methods = new ObservableCollection<DiagramUmlClassMethod>()
               {
                new DiagramUmlClassMethod()
                {
                  Name = "getHistory", Type = "getHistory"
                }
             }
          }
        }
       //Add node
       NodeCollection.Add(Node);
     }

    Constructors

    DiagramUmlClass()

    Sets or gets the behavior of the Uml class shapes.

    Declaration
    public DiagramUmlClass()

    Properties

    Attributes

    Specifies the variable, where user can define when creating a class.

    Declaration
    public ObservableCollection<DiagramUmlClassAttribute> Attributes { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<DiagramUmlClassAttribute>
    Remarks

    The attribute’s Name, Type, and Scope properties allow you to define the name, data type, and visibility of the attribute.

    Methods

    Specifies the implementation of operation in a class.

    Declaration
    public ObservableCollection<DiagramUmlClassMethod> Methods { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<DiagramUmlClassMethod>
    Remarks

    The method`s Name, Parameters, Type, and scope properties allow you to define the name, parameter, return type, and visibility of the methods.

    Name

    Defines the name of the attributes.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Style

    Sets the shape style of the node.

    Declaration
    public UMLClassShapeStyle Style { get; set; }
    Property Value
    Type Description
    UMLClassShapeStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved