Draws a formatted text string, the same way text is drawn in shape nodes whose EnableStyledText property is set to true. This method lets you display styled text in custom-drawn nodes or links.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public void DrawStyledText ( |
Visual Basic Copy Code |
---|
Public Sub DrawStyledText( _ |
A .NET DrawingContext object used to draw the text.
The text that should be drawn, including formatting tags.
The bounds of the text layout rectangle.
C# Copy Code |
---|
private void diagram_DrawNode(object sender, DrawNodeEventArgs e) TextAttributes textAtt = new TextAttributes(e.Node); |
Visual Basic Copy Code |
---|
Private Sub diagram_DrawNode(ByVal sender As Object, ByVal e As DrawNodeEventArgs) Handles diagram.DrawNode Dim r As Rect = e.Node.Bounds Dim textAtt As TextAttributes = New TextAttributes(e.Node) End Sub |
WpfDiagram Programmer's Guide | © 2024 MindFusion |