Dependency Properties

Classes in the XAML UI Framework tend to expose a lot of properties, because properties are easy to set in XAML. And most of these are dependency properties in order to easily support animation, styling, and automatic data binding directly from declarative markup. Without the extra plumbing in dependency properties, it would be hard for the simple action of setting properties to get the desired results without writing additional code.

A dependency property depends on multiple providers for determining its value at any point in time. These providers could be an animation continuously changing its value, a parent element whose property value propagates down to its children, and so on. Arguably the biggest feature of a dependency ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.