MenuFlyout.ShowAt(UIElement, Point) MenuFlyout.ShowAt(UIElement, Point) MenuFlyout.ShowAt(UIElement, Point) MenuFlyout.ShowAt(UIElement, Point) Method

Definition

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

public : void ShowAt(UIElement targetElement, Point point)
void ShowAt(UIElement targetElement, Point point) const;
public void ShowAt(UIElement targetElement, Point point)
Public Sub ShowAt(targetElement As UIElement, point As Point)

Parameters

targetElement
UIElement UIElement

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

point
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.

See also