Gets or sets a reference to the node's geometric shape definition. This is a dependency property.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
SyntaxC#
Copy Code
|
|---|
public Shape Shape { get; set; } |
Visual Basic
Copy Code
|
|---|
Public Property Shape As Shape |
An instance of the Shape class.
RemarksUse this property to assign a complex shape to a node. Complex shapes consist of outlines, decorations and text-region definitions that can be defined as series of lines, arcs and curves. To define a custom shape, create an instance of the Shape class. That class also provides over 100 predefined shapes exposed by the Shapes collection.
ExampleThe following sample code illustrates how to use the predefined shapes and how to create your own custom shapes:
C#
Copy Code
|
|---|
private void example_Click(object sender, RoutedEventArgs e) // Use one of the predefined shapes // Create a custom shape |
Visual Basic
Copy Code
|
|---|
Private Sub example_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles example.Click Dim shapeNode0 As ShapeNode = CType(diagram.Nodes(0), ShapeNode) ' Use one of the predefined shapes ' Create a custom shape End Sub |
See Also