From the course: Windows Presentation Foundation 4: Brushes and Colors
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Use system color resources
From the course: Windows Presentation Foundation 4: Brushes and Colors
Use system color resources
- [Instructor] In the Microsoft Windows operating systems there's a standard set of colors that are used throughout the operating system and are used to draw certain parts of the windows that the user sees. So if you want parts of your application to be consistent with the same colors that are used inside the operating system, you can use a set of pre-defined system colors in WPF. Here's how that works. Hold down the spacebar and move this over a bit. Selected my ellipse, I want to fill this ellipse with a solider color brush. So I go to Properties, go to Brush, click on the Fill property, click on Solid Color Brush. Now I want to set the color of that brush based on the system color. So go look at the Color Resources tab, and you'll see that I have my three local resources that I've defined here, and below that is a set of standard colors. So if you want your application to match the Gradient Active Caption Color Key, use this item. I'll choose the Desktop Color Key. And then I'll go…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.