Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Brushes

As you know, brushes fill an area, whether it's the background, foreground, or border of an element, or the fill or stroke of a shape. For elements, you use brushes with the Foreground, Background, and BorderBrush properties. For shapes, you use the Fill and Stroke properties.

You've used brushes throughout this book, but so far you've done most of your work with the straightforward SolidColorBrush. Although SolidColorBrush is indisputably useful, several other classes inherit from System.Windows.Media.Brush and give you more exotic effects. Table 9-1 lists them all.

Images

In this chapter, you'll learn how to use LinearGradientBrush, RadialGradientBrush, and ImageBrush. VideoBrush is discussed in Chapter 12, when you explore Silverlight's media support.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial