PopupMenu.ShowAsync Method

Shows the context menu at the specified client coordinates.

Syntax

public:
IAsyncOperation<IUICommand^ >^ ShowAsync(
         Point invocationPoint
)  

Parameters

invocationPoint
Type: Point 

The coordinates (in DIPs), relative to the window, of the user’s finger or mouse pointer when the oncontextmenu event fired. The menu is placed above and centered on this point.

Note

  For VB, C#, and C++, this window is the CoreWindow associated with the thread that is calling the context menu.

Return value

Type: IAsyncOperation<IUICommand^ > 

A IUICommand object that represents the context menu command that was invoked by the user, after the ShowAsync call completes.

If no command is invoked, ShowAsync returns null.

Remarks

You can see complete code examples that demonstrate how to create and customize context menus in the Context menu sample on the Microsoft Store app sample home page.

Requirements

Namespace: Windows.UI.Popups

Metadata: windows.winmd

See also

Reference

PopupMenu Class

PopupMenu Members

Windows.UI.Popups Namespace