A property that is backed by the WPF property system is known as a dependency property.
This overview describes the WPF property system and the capabilities of a dependency property.
Dependency property values are not stored as fields on the class, they are stored by the xaml framework, and are referenced using a key, which is retrieved when the property is registered with the Windows Runtime property system by calling the Dependency Property. Dependency properties can be used only by types deriving from Dependency Object.
But Dependency Object is quite high in the class hierarchy, so the majority of classes that are intended for UI and presentation support can support dependency properties. Convention is that each dependency property exposed by a class has a corresponding public static readonly property of type Dependency Property that is exposed on that same class the provides the identifier for the dependency property.
By convention, the name of the field should end with .
The first parameter is the name of the property itself (without the suffix).
In WPF, properties are typically exposed as common language runtime (CLR) properties.
What isn’t done in the code is passing information to set the value of any properties or custom properties. Like this: But that is a loads like this: With that data context set, you might try this: But this fails. After you change the type of property to a dependency property you can bind to the same property from the XAML of the user control and the XAML of the parent.
Please note: the data context property of the user control inherits from the parent. But user controls don’t anticipate a data context type. Writing to one writes to the other and the dependency property itself keeps the coalesced value.
Windows Presentation Foundation (WPF) provides a set of services that can be used to extend the functionality of a common language runtime (CLR) property.
Collectively, these services are typically referred to as the WPF property system.