Introducing Brushes

Probably lots of times you wanted to fill your UI controls with interesting background textures or with gradients or simply set a particular color, maybe as the background or the foreground. In Windows Presentation Foundation you fill visual elements with brushes. WPF defines several kinds of brushes, all deriving from System.Windows.Media.Brush. The following list summarizes available brushes:

SolidColorBrush, which allows filling a graphical object with a single color. Colors are exposed as static properties from the System.Windows.Media.Colors class.

LinearGradientBrush, which enables filling a graphical object with a linear gradient composed of multiple colors.

RadialGradientBrush, which is similar to the previous ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.