Control.IsEnabledChanged Event


Occurs when the IsEnabled property changes.

 virtual event DependencyPropertyChangedEventHandler ^ IsEnabledChanged;
// Register
event_token IsEnabledChanged(DependencyPropertyChangedEventHandler const& handler) const;

// Revoke with event_token
void IsEnabledChanged(event_token const* cookie) const;

// Revoke with event_revoker
IsEnabledChanged_revoker IsEnabledChanged(auto_revoke_t, DependencyPropertyChangedEventHandler const& handler) const;
public event DependencyPropertyChangedEventHandler IsEnabledChanged;
function onIsEnabledChanged(eventArgs) { /* Your code */ }
control.addEventListener("isenabledchanged", onIsEnabledChanged);
control.removeEventListener("isenabledchanged", onIsEnabledChanged);
- or -
control.onisenabledchanged = onIsEnabledChanged;
Public Custom Event IsEnabledChanged As DependencyPropertyChangedEventHandler 
<control IsEnabledChanged="eventhandler"/>

Event Type


Whenever IsEnabled changes, that fires the IsEnabledChanged event. Controls might handle this event in order to change the visual states. The event has DependencyPropertyChangedEventArgs data, so you can determine the old and new values without having to use your own flags.

A control inherits the IsEnabled property from its parent control. For example, if a control that contains a button has IsEnabled set to false, the button's IsEnabled property is also false. When the parent's property changes, that fires IsEnabledChanged for each control where the value changes because of the value inheriting.

Applies to

See also