Initializes a new instance of the Shape class with the specified outline formula and id.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public Shape ( |
Visual Basic Copy Code |
---|
Public New ( _ |
The string identifier of the new shape.
This example creates a triangular shape:
C# Copy Code |
---|
Shape shape = new Shape(CreatePath, "my shape"); PathGeometry CreatePath(ShapeData shapeData) { var path = new PathGeometry(); var fig = new PathFigure(); fig.StartPoint = new Point(10, 0); fig.Segments.Add(new LineSegment(new Point(shapeData.Width, 10), true)); fig.Segments.Add(new LineSegment(new Point(shapeData.Width / 2, shapeData.Height), true)); fig.IsClosed = true; path.Figures.Add(fig); return path; } |
WpfDiagram Programmer's Guide | © 2024 MindFusion |