Invoke Method
Collapse the table of content
Expand the table of content

InvokePattern.Invoke Method ()


Sends a request to activate a control and initiate its single, unambiguous action.

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

public void Invoke()

Exception Condition

The element does not support the InvokePattern control pattern or is hidden or blocked.


The element is not enabled. Can be raised when a UI Automation provider has implemented its own handling of the IsEnabled property.

Calls to Invoke should return immediately without blocking. However, this behavior is entirely dependent on the Microsoft UI Automation provider implementation. In scenarios where calling Invoke causes a blocking issue (such as a modal dialog) a separate helper thread may be required to call the method.

In the following example an InvokePatterncontrol pattern is obtained from a control and the Invoke method is called.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft