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
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public SizeF 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 SizeF

 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 SizeF structure that represents the size of the string text when drawn with the font parameter and the stringFormat parameter.

 See Also