From the course: Microsoft XAML: 3 Type Converters and Resources
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Colors in resources
From the course: Microsoft XAML: 3 Type Converters and Resources
Colors in resources
- [Instructor] One standard I see a lot in sample applications is defining a common set of colors and brushes that you use throughout your application. We're seeing how to use brushes in some of the other videos. Here's an example on line 15 I've got a solid color brush and the key for that is main brush and it's a pink brush and then I also have another one here that's called accent brush, and this is another standard you see, instead of using keys like pink brush and lavender brush it's better to use a name that reflects its function. Main border brush, main brush, accent color brush, something like that. That way, let's call this pink brush and I decided that pink was not the right color I'd have to change the key and I'd also have to change all my places where I use that key in my static resources. On line 13 and line 14 I've declared a color resource. You see the syntax is pretty simple, it's color and then the key and then in between the beginning and ending tags is the…
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.
Contents
-
-
-
-
(Locked)
Types of resources6m 31s
-
XAML resources and ResourceDictionaries4m 4s
-
(Locked)
The Resources property2m 44s
-
(Locked)
Use resource with the StaticResource markup extensions3m 46s
-
(Locked)
Styles in resources1m 23s
-
(Locked)
Colors in resources1m 29s
-
(Locked)
Data and templates in resources3m 3s
-
(Locked)
Explore the resource hierarchy2m 51s
-
(Locked)
Create Resources with the Properties window5m 54s
-
(Locked)
A quick look at merged resources5m 24s
-
(Locked)
Use the Pack URI to locate resource files2m 39s
-
(Locked)
Load a resource file for dynamic application UI2m 6s
-
(Locked)
-