Version

MeasureString(DrawStringParameters,Int32,Int32) Method

Measures a string with the specified parameters.
Syntax
'Declaration
 
Public Overloads Shared Function MeasureString( _
   ByRef parameters As DrawStringParameters, _
   ByRef charactersFitted As Integer, _
   ByRef linesFilled As Integer _
) As SizeF
public static SizeF MeasureString( 
   ref DrawStringParameters parameters,
   out int charactersFitted,
   out int linesFilled
)

Parameters

parameters
The parameters which contain the string to measure, information on how to layout the text, and what to measure it with.
charactersFitted
[out] The number of characters that were fitted into the layout area.
linesFilled
[out] The number of text lines that were filled into the layout area.

Return Value

The size of the text specified with the specified text drawing parameters.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also