[]
        
(Showing Draft Content)

C1.Framework.Drawing.Gdi.Graphics.DrawString

DrawString Method

DrawString(string, Font, Brush, Point, StringFormat)

Draws the specified text string at the specified location with the specified Brush and Font objects using the formatting attributes of the specified StringFormat object.

Declaration
public void DrawString(string s, Font font, Brush brush, Point point, StringFormat format)
Parameters
Type Name Description
string s

String to draw.

Font font

Font object that defines the text format of the string.

Brush brush

Brush object that determines the color and texture of the drawn text.

Point point

Point structure that specifies the upper-left corner of the drawn text.

StringFormat format

StringFormat object that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.

DrawString(string, Font, Brush, Rectangle, StringFormat)

Draws the specified text string in the specified rectangle with the specified Brush and Font objects using the formatting attributes of the specified StringFormat object.

Declaration
public void DrawString(string s, Font font, Brush brush, Rectangle layoutRectangle, StringFormat format)
Parameters
Type Name Description
string s

String to draw.

Font font

Font object that defines the text format of the string.

Brush brush

Brush object that determines the color and texture of the drawn text.

Rectangle layoutRectangle

Rectangle structure that specifies the location of the drawn text.

StringFormat format

StringFormat object that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.