Export (0) Print
Expand All

TextMetrics Structure

Provides basic information about the font specified by a visual style for a particular element.

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

public struct TextMetrics

The TextMetrics type exposes the following members.

  NameDescription
Public propertyAscentGets or sets the ascent of characters in the font.
Public propertyAverageCharWidthGets or sets the average width of characters in the font.
Public propertyBreakCharGets or sets the character used to define word breaks for text justification.
Public propertyCharSetGets or sets the character set of the font.
Public propertyDefaultCharGets or sets the character to be substituted for characters not in the font.
Public propertyDescentGets or sets the descent of characters in the font.
Public propertyDigitizedAspectXGets or sets the horizontal aspect of the device for which the font was designed.
Public propertyDigitizedAspectYGets or sets the vertical aspect of the device for which the font was designed.
Public propertyExternalLeadingGets or sets the amount of extra leading that the application adds between rows.
Public propertyFirstCharGets or sets the first character defined in the font.
Public propertyHeightGets or sets the height of characters in the font.
Public propertyInternalLeadingGets or sets the amount of leading inside the bounds set by the Height property.
Public propertyItalicGets or sets a value indicating whether the font is italic.
Public propertyLastCharGets or sets the last character defined in the font.
Public propertyMaxCharWidthGets or sets the width of the widest character in the font.
Public propertyOverhangGets or sets the extra width per string that may be added to some synthesized fonts.
Public propertyPitchAndFamilyGets or sets information about the pitch, technology, and family of a physical font.
Public propertyStruckOutGets or sets a value indicating whether the font specifies a horizontal line through the characters.
Public propertyUnderlinedGets or sets a value indicating whether the font is underlined.
Public propertyWeightGets or sets the weight of the font.
Top

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ValueType.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

The TextMetrics structure specifies the return values of the VisualStyleRenderer.GetTextMetrics method.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft