July 28, 2014
Retrieves the property metadata value for the dependency property as registered to the specified Type.
Assembly: System.Windows (in System.Windows.dll)
In WPF, specifying either the type or an object reference to obtain a type from is necessary because the metadata can vary from the original registration. (This is because WPF supports AddOwner or OverrideMetadata calls that alter the metadata of the dependency property as it exists on a type.) Windows Phone does not support a similar AddOwner or OverrideMetadata technique. However, the Windows Phone implementation of still requires a type to be passed for compatibility reasons. To get a value to use as forType, you can either call typeof() for the known owner type of the dependency property, or use an available type reference you have obtained by some other means.
The following example implements a utility method that reports the default value of a given dependency property as it exists in FrameworkElement, based on the default value registered and stored in the metadata: