Expand Minimize

Control.IsEnabledChanged event

Applies to Windows and Windows Phone

Occurs when the IsEnabled property changes.

Syntax


public:
event DependencyPropertyChangedEventHandler^ IsEnabledChanged {
   Windows::Foundation::EventRegistrationToken add(DependencyPropertyChangedEventHandler^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}


<control IsEnabledChanged="eventhandler"/>

Event information

Delegate DependencyPropertyChangedEventHandler

Remarks

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.

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.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Control
IsEnabled
DependencyPropertyChangedEventArgs

 

 

Show:
© 2014 Microsoft