Measures the given text text by the given parameters.
Namespace:
SGP.XSpaceAssembly: SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825
Syntax
C# |
---|
[EditorBrowsableAttribute(EditorBrowsableState.Advanced)] public Rectangle MeasureString( string text, Font font, DrawTextFormat format, Color color ) |
Parameters
- text
- Type: System..::.String
Text to measure.
- font
- Type: Font
The DirectX surface Font font type.
- format
- Type: DrawTextFormat
The DrawTextFormat text format defines way of displaying the text.
- color
- Type: System.Drawing..::.Color
Text color.
Return Value
Returns measured text size.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | font is nullNothingnullptra null reference (Nothing in Visual Basic). |