Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151374 | Feb 9,2020 01:12 PM UTC | Mar 11,2020 11:42 PM UTC | Blazor | 5 |
![]() |
Tags: Diagram |
//Add a custom connector to symbbol palette...
private void CreatePaletteConnector(string id)
{
ExampleConnector diagramConnector = new ExampleConnector()
{
Id = id,
};
ConnectorList.Add(diagramConnector);
}
//Activate tool to draw a custom connector...
private void Draw(MouseEventArgs args)
{
drawingObject = new ExampleConnector();
diagram.Tool = DiagramTools.ContinuousDraw;
}
public class ExampleConnector : DiagramConnector
{
public ExampleConnector() : base()
{
Type = DiagramSegments.Orthogonal;
SourcePoint = new ConnectorSourcePoint() { X = 0, Y = 0 };
TargetPoint = new ConnectorTargetPoint() { X = 100, Y = 100 };
Style = new ConnectorShapeStyle()
{
StrokeColor = "#FF0000",
StrokeWidth = 2,
};
TargetDecorator = new ConnectorTargetDecorator() { Shape = DecoratorShapes.None };
Constraints = ConnectorConstraints.Default & ~ConnectorConstraints.Drag;
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.