Class SourceMultiplicityLabel
Specifies the source label to the connector.
Namespace: Syncfusion.Blazor.Diagrams
Assembly: Syncfusion.Blazor.dll
Syntax
public class SourceMultiplicityLabel : SfDiagramBase
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);
}
}
Constructors
SourceMultiplicityLabel()
Specifies the source label to the connector.
Declaration
public SourceMultiplicityLabel()
Properties
LowerBounds
Defines the minimum bounds of the Classifier Multiplicity. Lower bounds should be lesser than upper bounds.
Declaration
public string LowerBounds { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Optional
Defines the optionality for the connector source label. By default, It`s set to true.
Declaration
public bool Optional { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UpperBounds
Defines the maximum bounds of the Classifier Multiplicity. Upper bounds should be greater than or equal to Lower bounds.
Declaration
public string UpperBounds { get; set; }
Property Value
Type | Description |
---|---|
System.String |