Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddAutomationPropertyChangedEventHandler Method

Automation.AddAutomationPropertyChangedEventHandler Method

Registers a method that will handle property-changed events.

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

static member AddAutomationPropertyChangedEventHandler : 
        element:AutomationElement * 
        scope:TreeScope * 
        eventHandler:AutomationPropertyChangedEventHandler * 
        properties:AutomationProperty[] -> unit

Parameters

element
Type: System.Windows.Automation.AutomationElement

The UI Automation element with which to associate the event handler.

scope
Type: System.Windows.Automation.TreeScope

The scope of events to be handled; that is, whether they are on the element itself, or on its ancestors and children.

eventHandler
Type: System.Windows.Automation.AutomationPropertyChangedEventHandler

The method to call when the event occurs.

properties
Type: System.Windows.Automation.AutomationProperty[]

The UI Automation properties of interest.

The user interface (UI) item specified by the supplied UI Automation element might not support the properties specified by the properties parameter.

eventHandler can be an instance of the method, or a reference to the method (AddressOf in Visual Basic).

The following example code adds an event handler that listens for a change in the enabled state of a specified element.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft