Type Default Value Read Only Static Description
XColor White No No The paint color.
Notes

This property reflects the paint color used to fill a drawn object such as a shape.

See Also

PenColor

XColor

Specifying Colors.

Pattern

Example

Here we draw two shapes, one blue and one red. The blue shape uses the Canvas default colors.

[C#]Canvas canvas = new Canvas(100, 100);
DrawOptions drawOpts = new DrawOptions(canvas);
drawOpts.PaintColor.Color = Color.Blue;
drawOpts.PenColor.Color = Color.DarkBlue;
canvas.DrawOval(new XRect(0, 0, 50, 50), drawOpts);
drawOpts.PaintColor.Color = Color.Red;
drawOpts.PenColor.Color = Color.DarkRed;
canvas.DrawOval(new XRect(50, 50, 50, 50), drawOpts);
canvas.SaveAs(Server.MapPath("DrawOptions_PaintColor_82.png"));


[Visual Basic]Dim canvas As New Canvas(100, 100)
Dim drawOpts As New DrawOptions(canvas)
drawOpts.PaintColor.Color = Color.Blue
drawOpts.PenColor.Color = Color.DarkBlue
canvas.DrawOval(New XRect(0, 0, 50, 50), drawOpts)
drawOpts.PaintColor.Color = Color.Red
drawOpts.PenColor.Color = Color.DarkRed
canvas.DrawOval(New XRect(50, 50, 50, 50), drawOpts)
canvas.SaveAs(Server.MapPath("DrawOptions_PaintColor_82.png"))



DrawOptions_PaintColor_82.png