The red, green, blue color-channels are stored as byte values. In this tutorial learn how hexadecimal notation provides a way to set the RGB values using a concise string syntax.
- [Instructor] As a programmer, you know…that when you have byte information,…one way that you can represent that…is using hexadecimal notation.…It won't surprise you to learn that WPF supports this…for setting the red, green, blue and alpha channels…for the color structure.…I'll start by showing you how to do this in XAML,…and then we'll switch over to C sharp code…and show you how to do the equivalent.…In this example, I have five ellipses on this window.…This first ellipse here, ellipse number one,…has currently got its fill value set to a null value.…This is how you represent a null in XAML.…
What this means is there is no brush assigned…to this property.…Since there's no brush assigned,…when it's time to render this, it'll use…a transparent solid color brush to render those pixels.…To do hexadecimal notation in XAML, you start by putting in…a pound symbol, and then the simplest notation is…to use three digits.…These digits can go from zero to F.…This represents red, the second digit represents green,…and the third one represents blue.…
- 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.