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.
The Resources property
From the course: Microsoft XAML: 3 Type Converters and Resources
The Resources property
- [Narrator] I'd say that the most common place I see resources used in XAML files is in your main UI files, like this Window file, or user control, or a page. So here I am in this Window XAML file, this main window that has XAML file. And you can see it's got a section Window.Resources. So there's a property and this of type resource dictionary. So I can create these solar colored brushes inside the resources dictionary, give them keys. And if I know the key, then I can use them elsewhere in my XAML. What I wanna talk about is some of the other elements that have resources property. Most of the UI elements you'll work with have the resources property. I'll start by looking at the window class. Press F12. And here's the window. And it derives from Content Control, which derives from Control, and that derives from Framework Element. We'll look in the properties for the Framework Element. There is a property called Resources. And you see that it is of type Resource Dictionary. Now…
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)
-