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

The Resources property

From the course: Microsoft XAML: 3 Type Converters and Resources

Start my 1-month free trial

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…

Contents