PropertyMetadata.DefaultValue property

Applies to Windows and Windows Phone

Gets the default value for the dependency property.

Syntax


public object DefaultValue { get; }

Property value

Type: System.Object [.NET] | Platform::Object [C++]

The default value for the dependency property.

Remarks

Defining the DefaultValue property for a PropertyMetadata instance is part of the scenario for defining a custom dependency property. For info and examples, see Custom dependency properties.

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

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

PropertyMetadata
CreateDefaultValueCallback
DependencyProperty.Register
Custom dependency properties
Dependency properties overview

 

 

Show:
© 2014 Microsoft