Export (0) Print
Expand All

TextRenderer.MeasureText Method

Measures the specified text when drawn with the specified font.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member MeasureText(String, Font) Provides the size, in pixels, of the specified text when drawn with the specified font.
Public method Static member MeasureText(IDeviceContext, String, Font) Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context.
Public method Static member MeasureText(String, Font, Size) Provides the size, in pixels, of the specified text when drawn with the specified font, using the specified size to create an initial bounding rectangle.
Public method Static member MeasureText(IDeviceContext, String, Font, Size) Provides the size, in pixels, of the specified text when drawn with the specified font in the specified device context, using the specified size to create an initial bounding rectangle for the text.
Public method Static member MeasureText(String, Font, Size, TextFormatFlags) Provides the size, in pixels, of the specified text when drawn with the specified font and formatting instructions, using the specified size to create the initial bounding rectangle for the text.
Public method Static member MeasureText(IDeviceContext, String, Font, Size, TextFormatFlags) Provides the size, in pixels, of the specified text when drawn with the specified device context, font, and formatting instructions, using the specified size to create the initial bounding rectangle for the text.
Top

Community Additions

ADD
Show:
© 2014 Microsoft