Version

GetTextHeight Method

Support For Whidbey SnapLines Gets the height of text used to calculate a Text BaseLine SnapLine
Syntax
'Declaration
 
Public Shared Function GetTextHeight( _
   ByVal control As Control, _
   ByVal alignment As ContentAlignment, _
   ByVal font As Font _
) As Integer
public static int GetTextHeight( 
   Control control,
   ContentAlignment alignment,
   Font font
)

Parameters

control
The control from which to create a graphics object.
alignment
The System.Drawing.ContentAlignment of the control.
font
The System.Drawing.Font that should be used for measuring.

Return Value

The height of text used to calculate a Text BaseLine SnapLine.
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