ShapeNode instances are diagram nodes that represent geometric shapes.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public class ShapeNode : DiagramNode |
Visual Basic Copy Code |
---|
Public Class ShapeNode |
A ShapeNode instance might represent nodes in graphs, tree, process diagrams, and so on.
The shape of a node is specified by the Shape property. Shapes can be rotated, either interactively using the rotation handle above the node, or programmatically using the RotationAngle property.
Shape nodes can display images and text. Set an image to be painted inside a node by assigning it to the Image property. The position of the image within the node as well as its alignment are set by the ImageAlign property. To make a node as big as its image, call ResizeToFitImage.
Text inside a shape node is represented by the Text property. Its attributes can be changed by using the TextBrush and TextFormat properties. To get even richer text formatting, set EnableStyledText to true and embed HTML-like formatting tags in the raw text. Text can be laid out inside arbitrary polygonal shapes by enabling PolygonalTextLayout. To make a node big enough to display its text without clipping, call ResizeToFitText.
To let users edit a node's text inline, call the BeginEdit method of DiagramView, e.g. from NodeClicked event handler. Call EndEdit to exit in-place editing mode. If the view's AllowInplaceEdit property is enabled, users can double-click a node in order to edit its text.
Fill and border colors can be specified by setting the Pen and Brush properties. Shape nodes can be transparent as set by the Transparent property.
Shape nodes can have incoming and outgoing DiagramLink objects, which are accessible through the IncomingLinks and OutgoingLinks properties defined in the DiagramNode class.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
MindFusion.Diagramming.Wpf.DiagramItem
MindFusion.Diagramming.Wpf.DiagramNode
MindFusion.Diagramming.Wpf.ShapeNode
MindFusion.Diagramming.Wpf.SvgNode