WPF, Silverlight, and UWA are built on the .NET framework, so all the visual elements are really .NET types. They have properties, events, and methods like any .NET type. But Microsoft knew there were potential problems with building a UI system on a managed type system. So when they built WPF, the first system to use XAML, they tried to mitigate some of the issues. This tutorial looks the Dependency Property System, a system built to solve UI specific problems in a managed code base.
- [Instructor] WPF, Silverlight,…and Universal Windows applications…are built on the .NET framework,…so all the visual elements are really .NET types.…They have properties, events, and methods…like any .NET type.…But Microsoft knew there were potential problems…with building a UI system on a managed type system.…So when they built WPF, the first system to use XAML,…they tried to mitigate some of the issues.…The outcome of that research is…a set of features that extend .NET.…For example, they knew that building a UI out of…thousands of intertwined managed UI controls and shapes…would take up memory, so they came up…with a sparse memory management system.…
They wanted an event system better adapted…to a hierarchical representation of a visual interface,…so they added a routed event model to WPF,…and they created a new property system…called the Dependency Property System.…That's the focus of this chapter.…I'll look at dependency properties,…and their close cousins, the attach properties.…To start the journey, let's look at…
- What does content mean in XAML?
- Using dotPeek to show property values for XAML elements
- Expressing content as objects, lists, or dictionaries in XAML vs. code
- Exploring dependency and attached properties
- Working with attached properties in the grid and canvas
- Using custom dependency properties