DataContextChangedEventArgs.Handled Property

Definition

Gets or sets a value that influences whether another DataContextChanged event should be fired from child elements that inherit the DataContext value and detect that the value has changed.

Equivalent WinUI property: Microsoft.UI.Xaml.DataContextChangedEventArgs.Handled.

public:
 property bool Handled { bool get(); void set(bool value); };
bool Handled();

void Handled(bool value);
public bool Handled { get; set; }
var boolean = dataContextChangedEventArgs.handled;
dataContextChangedEventArgs.handled = boolean;
Public Property Handled As Boolean

Property Value

Boolean

true to prevent further DataContextChanged events from being fired for each child FrameworkElement that inherits the DataContext value. You would do this to indicate to other handlers that the necessary logic for responding to the data context change has already been performed. false to permit the event to be fired by each immediate child FrameworkElement in the element tree that detects a change to the inherited DataContext value. The default is false.

Applies to

See also