Search
Diagram.MeasureString Method (String, Font, Int32, StringFormat)
See Also
 





Measures the specified text when drawn with the specified font in an area with the specified width taking into consideration the current affine transform of the diagram.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Size MeasureString (
    string text,
    Font font,
    int maxWidth,
    StringFormat textFormat
)

Visual Basic  Copy Code

Public Function MeasureString( _
    text As String, _
    font As Font, _
    maxWidth As Integer, _
    textFormat As StringFormat _
) As Size

 Parameters

text
The string to measure.
font
The font of the string.
maxWidth
The maximum width of the string.
textFormat
StringFormat object that represents formatting information, such as line spacing, for the string.

 Return Value

This method returns a Microsoft.Maui.Graphics.Size structure that represents the size of the string text when drawn with the font parameter and the stringFormat parameter.

 See Also