Most XAML element used for building application UI have a Resources property. This is a popular location for defining XAML resources. This tutorial explores the Resources property and the related ResourceDictionary type.
- [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 here's the thing.…This means that any UI element that derives…
Released
10/27/2016- Creating custom type converters
- Creating custom markup extensions
- Adding parameters
- Using resources
- Working with styles, colors, data, and templates in resources
- Creating resources
- Locating resource files
- Loading resource files
Share this video
Embed this video
Video: The Resources property