O'Reilly logo

Pro C# 2010 and the .NET 4 Platform, Fifth Edition by Andrew Troelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

29.3. WPF Brushes and Pens

Each of the WPF graphical rendering options (shape, drawing and geometries, and visuals) makes extensive use of brushes, which allow you to control how the interior of a 2D surface is filled. WPF provides six different brush types, all of which extend System.Windows.Media.Brush. While Brush is abstract, the descendents described in Table 29-4 can be used to fill a region with just about any conceivable option.

Table 29.4. WPF Brush-Derived Types
Brush TypeMeaning in Life
DrawingBrushPaints an area with a Drawing derived object (GeometryDrawing, ImageDrawing, or VideoDrawing)
ImageBrushPaints an area with an image (represented by an ImageSource object)
LinearGradientBrushPaints an area with a linear gradient
RadialGradientBrush ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required