IRawElementProviderSimple2 interface (uiautomationcore.h)

Extends the IRawElementProviderSimple interface to enable programmatically invoking context menus.


The IRawElementProviderSimple2 interface inherits from IRawElementProviderSimple. IRawElementProviderSimple2 also has these types of members:


The IRawElementProviderSimple2 interface has these methods.


Programmatically invokes a context menu on the target element.


This interface can be implemented on:

  • Providers that add or override properties or control patterns on a UI element that already has a provider.
If no context menu is available directly on the element on which ShowContextMenu was invoked, the provider should attempt to invoke a context menu on the UI Automation parent of the current item.


Minimum supported client Windows 8.1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 R2 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)