PropertyMetadata.DefaultValue Property

July 28, 2014

Gets the default value for the dependency property.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public Object DefaultValue { get; }

Property Value

Type: System.Object
The default value for the dependency property.

If you need to know the type of the value, you can either call typeof() on the value or use reflection to get PropertyInfo from the CLR wrapper of the dependency property.

In Windows Phone, you cannot reset a default value for a dependency property once it is registered.

The default value for a dependency property is often not the apparent value at run time, even if the property is not explicitly set.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft