MenuFlyout.ShowAt(UIElement, Point) Method

Definition

Shows the flyout placed at the specified offset in relation to the specified target element.

public:
 virtual void ShowAt(UIElement ^ targetElement, Point point) = ShowAt;
void ShowAt(UIElement const& targetElement, Point const& point);
public void ShowAt(UIElement targetElement, Point point);
function showAt(targetElement, point)
Public Sub ShowAt (targetElement As UIElement, point As Point)

Parameters

targetElement
UIElement

The element to use as the flyout's placement target.

point
Point

The point at which to offset the flyout from the specified target element.

Examples

To position the menu relative to a UI element, specify the element and offset.

MenuFlyout.ShowAt(element, new Point(0,0));

To position the menu relative to the application window, set the targetElement parameter to null.

MenuFlyout.ShowAt(null, new Point(x, y));

Remarks

When you call this method to show a MenuFlyout, it automatically renders outside the application window if possible and required.

Some properties might not flow as expected, such as FlowDirection. To ensure correct flow, you can set the flow direction in the MenuFlyoutPresenter The MenuFlyoutPresenter must be set before the MenuFlyout is first shown.

Applies to

See also