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
Package: MindFusion.Diagramming
C# Copy Code |
---|
public static void DrawStyledText ( |
Visual Basic Copy Code |
---|
Public Shared Sub DrawStyledText( _ |
The text that should be drawn, including formatting tags.
The font used to draw the text.
The brush used to draw the text.
The bounds of the text layout rectangle.
Specifies the text alignment.
You might use this method when you custom-draw shape nodes and still need to use the EnableStyledText rendering functionality of NetDiagram.
The following sample code illustrates how to manually render styled text.
C# Copy Code |
---|
private void diagram_DrawNode(object sender, DrawNodeEventArgs e) |
Visual Basic Copy Code |
---|
Private Sub diagram_DrawNode(ByVal sender As Object, ByVal e As DrawNodeEventArgs) Handles diagram.DrawNode |
NetDiagram Programmer's Guide | © 2023 MindFusion |