Blazor

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

    Show / Hide Table of Contents

    Class Multiplicity

    Specifies the multiplicity of uml connector shapes.

    Inheritance
    System.Object
    Multiplicity
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class Multiplicity : Enum
    Remarks
    To know more about using multiplicity, refer to these links
    1. Uml Diagram Shapes
    To apply one to many multiplicity, 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()
           {
               Id = "Connector1",
               Type = Segments.Straight,
               Shape = new DiagramConnectorShape()
               {
                   Type = ConnectionShapes.UmlClassifier,
                   //Set an relationship for connector
                   Relationship = ClassifierShape.Dependency,
                   Multiplicity = new DiagramClassifierMultiplicity()
                   {
                       //Set multiplicity type
                       Type = Multiplicity.OneToMany,
                       //Set source label to connector
                       Source = new SourceMultiplicityLabel()
                       {
                           Optional = true,
                           LowerBounds = "89",
                           UpperBounds = "67"
                       },
                       //Set target label to a connector
                       Target = new TargetMultiplicityLabel()
                       {
                           Optional = true,
                           LowerBounds = "78",
                           UpperBounds = "90"
                       }
                   }
               },
               //Define connector start and endpoints
               SourcePoint = new ConnectorSourcePoint() { X = 100, Y = 100 },
               TargetPoint = new ConnectorTargetPoint() { X = 300, Y = 300 }
           };
           ConnectorCollection.Add(Connector);
       }
    }

    Fields

    ManyToOne

    Indicates the connector multiplicity is ManyToOne.

    Declaration
    public const Multiplicity ManyToOne
    Field Value
    Type Description
    Multiplicity

    OneToMany

    Indicates the connector multiplicity is OneToMany.

    Declaration
    public const Multiplicity OneToMany
    Field Value
    Type Description
    Multiplicity

    OneToOne

    Indicates the connector multiplicity is OneToOne.

    Declaration
    public const Multiplicity OneToOne
    Field Value
    Type Description
    Multiplicity

    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