Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
 UnsetValue Field
Other versions are also available for the following:
.NET Framework Class Library for Silverlight
DependencyProperty..::.UnsetValue Field
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Specifies a static value that is used by the property system rather than nullNothingnullptra null reference (Nothing in Visual Basic) to indicate that the property exists, but does not have its value set by the property system.

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

Visual Basic (Declaration)
Public Shared ReadOnly UnsetValue As Object
Visual Basic (Usage)
Dim value As Object

value = DependencyProperty.UnsetValue
C#
public static readonly Object UnsetValue
Visual C++
public:
static initonly Object^ UnsetValue
JScript
public static final var UnsetValue : Object

Field Value

Type: System..::.Object

An unset value.

UnsetValue is a sentinel value that is used for scenarios where the property system is unable to determine a requested DependencyProperty value. UnsetValue is used rather than nullNothingnullptra null reference (Nothing in Visual Basic), because nullNothingnullptra null reference (Nothing in Visual Basic) could be a valid property value, as well as a valid (and frequently used) default value. UnsetValue is never returned out of GetValue. When you call GetValue on a dependency property on a DependencyObject, one of the following applies:

Establishing a default value of UnsetValue is specifically disallowed.

ReadLocalValue returns UnsetValue when the requested property has not been locally set.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker