GetTextMetrics Method

VisualStyleRenderer.GetTextMetrics Method (IDeviceContext)

 

Retrieves information about the font specified by the current visual style element.

Namespace:   System.Windows.Forms.VisualStyles
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member GetTextMetrics : 
        dc:IDeviceContext -> TextMetrics

Parameters

dc
Type: System.Drawing.IDeviceContext

The IDeviceContext this operation will use.

Return Value

Type: System.Windows.Forms.VisualStyles.TextMetrics

A TextMetrics that provides information about the font specified by the current visual style element.

Exception Condition
ArgumentNullException

dc is null.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft