Blazor

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

    Show / Hide Table of Contents

    Class DiagramUmlClassMethod

    Defines the appearance and behavior of the UML Class Shape.

    Inheritance
    System.Object
    SfDiagramBase
    DiagramUmlClassMethod
    Inherited Members
    SfDiagramBase.UpdateCollection(IList, Boolean)
    SfDiagramBase.RandomString(Int32)
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramUmlClassMethod : SfDiagramBase
    Examples
     <SfDiagram Height="600px" Nodes="@NodeCollection">
       <DiagramSnapSettings Constraints = "SnapConstraints.None" ></ DiagramSnapSettings >
    </ SfDiagram >
    @code{
      //Defines diagram's Node collection
      public ObservableCollection<DiagramNode> NodeCollection { get; set; }
      protected override void OnInitialized()
      {
         NodeCollection = new ObservableCollection<DiagramNode>();
         DiagramNode Node = new DiagramNode()
        {
            OffsetX = 200,
            OffsetY = 200,
            Shape = new DiagramShape()
            {
             Type = Syncfusion.Blazor.Diagrams.Shapes.UmlClassifier,
             Classifier = ClassifierShape.Class,
             //Define class object
             ClassShape = new DiagramUmlClass()
             {
               Name = "Patient",
               //Define class methods
               Methods = new ObservableCollection<DiagramUmlClassMethod>()
               {
                new DiagramUmlClassMethod()
                {
                  Name = "getHistory", Type = "getHistory", Style = new UMLParameterShapeStyle()
                  { Color = "red" }, IsSeparator = true, Scope = UmlScope.Private
                }
              }
            }
           }
          };
          //Add node
          NodeCollection.Add(Node);
        }
      }

    Constructors

    DiagramUmlClassMethod()

    Defines the appearance and behavior of the UML Class Shape.

    Declaration
    public DiagramUmlClassMethod()

    Properties

    IsSeparator

    Specifies wether we need separator lines for each patrameters. By default, set to false.

    Declaration
    public bool IsSeparator { get; set; }
    Property Value
    Type Description
    System.Boolean

    Name

    Defines the name of the UML class attributes. By default, set to empty string.

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

    Parameters

    Defines the arguments to the UML class shape. By default, set to null.

    Declaration
    public ObservableCollection<DiagramMethodArguments> Parameters { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<DiagramMethodArguments>

    Scope

    Defines the scope(visibility) of the UML class attributes. By default, set to public.

    Declaration
    public UmlScope Scope { get; set; }
    Property Value
    Type Description
    UmlScope

    Style

    Defines the appearance of the Uml class method.

    Declaration
    public UMLParameterShapeStyle Style { get; set; }
    Property Value
    Type Description
    UMLParameterShapeStyle

    Type

    Defines the type of the UML class attributes. By default, it is set to empty string.

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