MobileForms Toolkit Documentation

GraphicsEx.DrawAlignedString Method (Graphics, String, String, CompareOptions, Font, Brush, Brush, Brush, Rectangle, Alignment, DrawStringOptions, SizeF, Rectangle, DrawTextLine)

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

public static bool DrawAlignedString(
Graphics gr,
string text,
string selectedText,
CompareOptions compareOptions,
Font font,
Brush brush,
Brush selectedBrush,
Brush selectedBackBrush,
Rectangle layoutRectangle,
Alignment textAlignment,
DrawStringOptions options,
SizeF scaleFactor,
out Rectangle ellipsisArea,
DrawTextLine drawTextLineDelegate
);

Parameters

gr
Graphics to use.
text
String to draw.
selectedText
Selected string to draw.
compareOptions
CompareOptions that specifies comparing attributes that are applied to selected text.
font
Font that defines the text format of the string.
brush
Brush that determines the color and texture of the drawn text.
selectedBrush
Brush that determines the color and texture of the selected text.
selectedBackBrush
Brush that determines the back color and texture of the selected text.
layoutRectangle
Rectangle structure that specifies the location of the drawn text.
textAlignment
Alignment that specifies the aligment of the drawn text
options
DrawStringOptions that specifies formatting attributes that are applied to the drawn text.
scaleFactor
A SizeF containing the horizontal and vertical scaling factors.
ellipsisArea
Rectangle structure that is fill with the location of the ellipsis.
drawTextLineDelegate
GraphicsEx.DrawTextLine delegate used to draw the text.

Return Value

Returns true if the drawn text fits into specified rectangle, otherwise false.

See Also

GraphicsEx Class | Resco.Drawing Namespace | GraphicsEx.DrawAlignedString Overload List