VisualStyleRenderer.DrawText Method (IDeviceContext, Rectangle, String)

 

Draws text in the specified bounds using default formatting.

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

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

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.

Exception Condition
ArgumentNullException

dc is null.

.NET Framework
Available since 2.0
Return to top
Show: