DependencyPropertyChangedEventArgs.OldValue DependencyPropertyChangedEventArgs.OldValue DependencyPropertyChangedEventArgs.OldValue DependencyPropertyChangedEventArgs.OldValue Property

Definition

Gets the value of the dependency property before the reported change.

public : Platform::Object OldValue { get; }
winrt::Windows::Foundation::IInspectable OldValue();
public object OldValue { get; }
Public ReadOnly Property OldValue As object

Property Value

object object

The dependency property value before the change.

Remarks

The OldValue value is often used as the value that the property is set to from within the callback, in case the NewValue value is not considered a valid value for your property's logic . For example, if you are using the callback for validation of an input value for a property that the user can set in UI, the previous value is typically a better value to use as the current value rather than resetting the value to a default. The callback is effectively canceling a change.

See also