From the course: Microsoft XAML: 2 Content and Properties

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

The trouble with normal .NET properties for UI

The trouble with normal .NET properties for UI

From the course: Microsoft XAML: 2 Content and Properties

Start my 1-month free trial

The trouble with normal .NET properties for UI

- [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.…

Contents