Explore over 100 Windows Presentation Format preset colors and learn to use them in both XAML and C# code.
- [Speaker] Using the red, green, and blue channels…in WPF, you can create a combination…of 16 million colors.…That's great, it give you a lot of choice,…but there will be times when you just want to use…a blue brush or an orange brush.…To make that easier, Microsoft has a class…called the colors class, that has a number of properties.…And each one of these properties returns…an instance of the color structure.…If you hover over one of these,…I'll get a tool tip that pops up.…It says, gets the system to find color…that has a RGB value of FF0000FF,…so that will return a blue color.…
Using these in your XMAL or C# code is very easy.…For example on this first ellipse,…I'll go to the fill property…and set this to one of the values.…One of the nice things that Visual Studio does,…is gives you intellisense when you start…filling out this string, it will read the values…from that colors class and store them here.…I know I want to use a crimson brush,…so I'll type in that.…And when it finds it on the list,…I'll press the tab key to finish typing.…
- 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?
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.