showContextMenu method

void showContextMenu()

Programmatically invokes a context menu on the target element.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement3-showcontextmenu.

Implementation

@pragma('vm:prefer-inline')
void showContextMenu() {
  final hr$ = HRESULT(_ShowContextMenuFn(ptr));
  if (hr$.isError) throw WindowsException(hr$);
}