Gradients are a technique used to specify multiple colors in an area and have the computer interpolate the in-between colors. This tutorial looks at the LInearGradientBrush and how to create banded colors.
- [Instructor] In WPF there are three basic ways…of creating a LinearGradientBrush.…You can hand edit the XAML.…You can use the Visual Studio property editor…to create the XAML, and you can write some C# code…to create a LinearGradientBrush.…In this example, I'll look at how to hand edit the XAML.…I'll be spending most of my time…in the XAML editor, but I do have the property window…full size over here on the right side of the screen.…If you want to match the way this UI looks on your computer,…let me show you how to do that.…You would undock the property window…from wherever you currently have it docked.…
Then you grab the title bar, and you drag it over here,…and near the bottom of the screen,…and when you see the tab outline, you let go,…and it becomes a tab that's on the same area…as this Solution Explorer.…I'll select my rectangle, and then we'll talk…about the fill property.…This is the typical way you do a solid color brush.…You come to the fill property.…You type in a hexadecimal value here,…or you type in a known color name like this.…
- Working with brushes
- Painting properties
- Painting in code
- Working with RGB channels
- Using hexadecimal values
- Setting opacity and transparency
- Editing color in the Visual Studio Color Editor
- Using gradient brushes
- Decorating with tiled brushes
- Adding brushes and colors to resources
- Working with opacity masks
Skill Level Intermediate
Windows Presentation Foundation: 2 Layoutwith Walt Ritscher2h 13m Intermediate
1. Brush and Color Overview
3. The Visual Studio Color Editor
4. The Gradient Brushes
5. The Tiled Brushes
6. Brushes and Colors in Resources
7. Opacity Mask
Examples of opacity patterns6m 47s
Next steps1m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.