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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access