Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MeasureText Method

TextRenderer.MeasureText Method

Measures the specified text when drawn with the specified font.

Name Description
TextRenderer.MeasureText (String, Font) Provides the size, in pixels, of the specified text when drawn with the specified font.
TextRenderer.MeasureText (IDeviceContext, String, Font) Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context.
TextRenderer.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.
TextRenderer.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.
TextRenderer.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.
TextRenderer.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.

Community Additions

ADD
Show:
© 2015 Microsoft