This appendix summarizes brushes. A
Brush defines the colors used to fill an area such as a
Ellipse. Brushes also define the colors used by many controls'
The following section briefly describes each of the types of
Brushes available. The sections that follow describe each of the
Brush types in greater detail.
Table G-1 summarizes the
Table G.1. Classes of Brush
Fills areas with a drawing.
Fills areas with one or more copies of an image.
Fills areas with a color gradient that shades between two or more colors in a linear direction.
Fills areas with a color gradient that shades between two or more colors radially.
Fills areas with a solid color.
Fills areas with a visual. (Loosely speaking, a visual is an object that provides rendering support for WPF. It's basically something that can draw itself such as a control.)
The Brushes example program shown in Figure G-1 demonstrates these kinds of brushes. The
SolidColorBrush fills its
Ellipse with dark gray, the
LinearGradientBrush shades from white at the top to black at the bottom, and the
RadialGradientBrush shades from white at the middle to black at the edges.
Figure G.1. Figure G-1
DrawingBrush fills areas with a
Drawing object. ...