Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

VisualStyleRenderer.DrawText Method (IDeviceContext, Rectangle, String, Boolean)

Draws text in the specified bounds with the option of displaying disabled text.

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

public void DrawText(
	IDeviceContext dc,
	Rectangle bounds,
	string textToDraw,
	bool drawDisabled
)

Parameters

dc
Type: System.Drawing.IDeviceContext

The IDeviceContext used to draw the text.

bounds
Type: System.Drawing.Rectangle

A Rectangle in which to draw the text.

textToDraw
Type: System.String

The text to draw.

drawDisabled
Type: System.Boolean

true to draw grayed-out text; otherwise, false.

ExceptionCondition
ArgumentNullException

dc is null.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft