Class BezierConnectorSettings
Represents the settings for a Bezier connector, which defines the appearance and behavior of the connector's curved segments.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class BezierConnectorSettings : DiagramObject, IDiagramObject, ICloneable
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Connectors="connectors"></SfDiagramComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
Connector connector2 = new Connector()
{
ID = "connector2",
SourcePoint = new DiagramPoint() { X = 700, Y = 200 },
TargetPoint = new DiagramPoint() { X = 1000, Y = 400 },
Segments = new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 750, Y = 250 }},
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 900, Y = 350 }}
},
Type = ConnectorSegmentType.Bezier,
BezierConnectorSettings = new BezierConnectorSettings() { SegmentEditOrientation = BezierSegmentEditOrientation.FreeForm, Smoothness = BezierSmoothness.Both, ControlPointsVisibility = ControlPointsVisibility.All },
};
connectors.Add(connector1);
}
}
Constructors
BezierConnectorSettings()
Declaration
public BezierConnectorSettings()
BezierConnectorSettings(BezierConnectorSettings)
Declaration
public BezierConnectorSettings(BezierConnectorSettings src)
Parameters
Type | Name | Description |
---|---|---|
BezierConnectorSettings | src |
Properties
AllowSegmentsReset
Gets or sets a value indicating whether to reset the current segment collections in response to a change in the connector's source and target ends.
Declaration
public bool AllowSegmentsReset { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is |
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Connectors="connectors"></SfDiagramComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
Connector connector2 = new Connector()
{
ID = "connector2",
SourcePoint = new DiagramPoint() { X = 700, Y = 200 },
TargetPoint = new DiagramPoint() { X = 1000, Y = 400 },
Segments = new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 750, Y = 250 }},
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 900, Y = 350 }}
},
Type = ConnectorSegmentType.Bezier,
BezierConnectorSettings = new BezierConnectorSettings() { AllowSegmentsReset = false },
};
connectors.Add(connector1);
}
}
ControlPointsVisibility
Gets or sets the visibility option for the control points in a Bezier connector.
Declaration
public ControlPointsVisibility ControlPointsVisibility { get; set; }
Property Value
Type | Description |
---|---|
ControlPointsVisibility | The default value is All |
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Connectors="connectors"></SfDiagramComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
Connector connector2 = new Connector()
{
ID = "connector2",
SourcePoint = new DiagramPoint() { X = 700, Y = 200 },
TargetPoint = new DiagramPoint() { X = 1000, Y = 400 },
Segments = new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 750, Y = 250 }},
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 900, Y = 350 }}
},
Type = ConnectorSegmentType.Bezier,
BezierConnectorSettings = new BezierConnectorSettings() { ControlPointsVisibility = ControlPointsVisibility.All },
};
connectors.Add(connector1);
}
}
SegmentEditOrientation
Gets or sets the orientation of the segment editing controls for a Bezier curve.
Declaration
public BezierSegmentEditOrientation SegmentEditOrientation { get; set; }
Property Value
Type | Description |
---|---|
BezierSegmentEditOrientation | The default value is FreeForm |
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Connectors="connectors"></SfDiagramComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
Connector connector2 = new Connector()
{
ID = "connector2",
SourcePoint = new DiagramPoint() { X = 700, Y = 200 },
TargetPoint = new DiagramPoint() { X = 1000, Y = 400 },
Segments = new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 750, Y = 250 }},
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 900, Y = 350 }}
},
Type = ConnectorSegmentType.Bezier,
BezierConnectorSettings = new BezierConnectorSettings() { SegmentEditOrientation = BezierSegmentEditOrientation.FreeForm },
};
connectors.Add(connector1);
}
}
Smoothness
Gets or sets the value to maintain the smoothness between the neighboring bezier segments.
Declaration
public BezierSmoothness Smoothness { get; set; }
Property Value
Type | Description |
---|---|
BezierSmoothness | The default value is Both |
Examples
<SfDiagramComponent @ref = "diagram" Height="600px" Width="90%" ID="diagram" @bind-Connectors="connectors"></SfDiagramComponent>
@code {
SfDiagramComponent diagram; DiagramObjectCollection<Connector> connectors = new DiagramObjectCollection<Connector>();
protected override void OnInitialized()
{
Connector connector2 = new Connector()
{
ID = "connector2",
SourcePoint = new DiagramPoint() { X = 700, Y = 200 },
TargetPoint = new DiagramPoint() { X = 1000, Y = 400 },
Segments = new DiagramObjectCollection<ConnectorSegment>()
{
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 750, Y = 250 }},
new BezierSegment() { Type = ConnectorSegmentType.Bezier, Point = new DiagramPoint() { X = 900, Y = 350 }}
},
Type = ConnectorSegmentType.Bezier,
BezierConnectorSettings = new BezierConnectorSettings() { Smoothness = BezierSmoothness.Both },
};
connectors.Add(connector1);
}
}
Methods
Clone()
Declaration
public override object Clone()
Returns
Type |
---|
System.Object |