Provides the size, in pixels, of the specified text drawn with the specified font in the specified device context.
- dc
- The device context in which to measure the text.
- text
- The text to measure.
- font
- The System.Drawing.Font to apply to the measured text.
The System.Drawing.Size, in pixels, of text drawn in a single line with the specified font in the specified device context.
The TextRenderer.MeasureText(System.Drawing.IDeviceContext, string, System.Drawing.Font) method requires that the text is drawn on a single line.