Type Default Value Read Only Static Description
XColor Black No No The color used for drawing text.
Notes

This is the color that will be used when drawing text on a Canvas.

See Also

XColor

Specifying Colors.

Example

Here we draw some text on a Canvas using specific text color, size and font.

[C#]Canvas canvas = new Canvas();
DrawOptions drawOpts = new DrawOptions();
drawOpts.TextFont = "Segoe Script";
drawOpts.TextSize = 18;
drawOpts.TextColor = new XColor(Color.Gold);
canvas.DrawText("Here is some text to draw...", drawOpts);
canvas.SaveAs(Server.MapPath("DrawOptions_Various_99.png"));


[Visual Basic]Dim canvas As New Canvas()
Dim drawOpts As New DrawOptions()
drawOpts.TextFont = "Segoe Script"
drawOpts.TextSize = 18
drawOpts.TextColor = New XColor(Color.Gold)
canvas.DrawText("Here is some text to draw...", drawOpts)
canvas.SaveAs(Server.MapPath("DrawOptions_Various_99.png"))



DrawOptions_Various_99.png