Click or drag to resize

GlassMeasureCompositedText Method

Provides the size, in pixels, of the specified text.

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static Size MeasureCompositedText(
	IDeviceContext dc,
	string text,
	Font font,
	TextFormatFlags textFormat
)

Parameters

dc
Type: System.DrawingIDeviceContext
The device context in which to measure the text.
text
Type: SystemString
The text to measure.
font
Type: System.DrawingFont
The Font to apply to the measured text.
textFormat
Type: System.Windows.FormsTextFormatFlags
A bitwise combination of the TextFormatFlags values.

Return Value

Type: Size
The Size, in pixels, of text drawn with the specified font and format.
Exceptions
ExceptionCondition
NotSupportedExceptionThe current operating system does not support glass, or the Desktop Window Manager is not enabled.
ArgumentNullExceptiondc, text or font is .
See Also