XamlUIPresenter.GetFlyoutPlacement Method

Definition

Invokes the FlyoutBase placement logic, using a suggested size of a control that will show a placement target and its flyout. Returns the bounds that are the result of running the placement logic.

public:
 static Rect GetFlyoutPlacement(Rect placementTargetBounds, Size controlSize, Size minControlSize, Rect containerRect, FlyoutPlacementMode targetPreferredPlacement, bool allowFallbacks, [Out] FlyoutPlacementMode & chosenPlacement);
 static Rect GetFlyoutPlacement(Rect const& placementTargetBounds, Size const& controlSize, Size const& minControlSize, Rect const& containerRect, FlyoutPlacementMode const& targetPreferredPlacement, bool const& allowFallbacks, [Out] FlyoutPlacementMode & chosenPlacement);
public static Rect GetFlyoutPlacement(Rect placementTargetBounds, Size controlSize, Size minControlSize, Rect containerRect, FlyoutPlacementMode targetPreferredPlacement, bool allowFallbacks, out FlyoutPlacementMode chosenPlacement);
Public Shared Function GetFlyoutPlacement (placementTargetBounds As Rect, controlSize As Size, minControlSize As Size, containerRect As Rect, targetPreferredPlacement As FlyoutPlacementMode, allowFallbacks As Boolean, ByRef chosenPlacement As FlyoutPlacementMode) As Rect

Parameters

placementTargetBounds
Rect

The bounds of the placement target element, which are passed to FlyoutBase presenter logic.

controlSize
Size

The desired size of the control that should display the flyout.

minControlSize
Size

The minimum size of the control that should display the flyout.

containerRect
Rect

The bounds of the area that should hold the placement target and flyout.

targetPreferredPlacement
FlyoutPlacementMode

The desired placement mode to use for FlyoutBase placement logic.

allowFallbacks
Boolean

bool

true if fallbacks can be used for the placement mode. false if fallbacks cannot be used.

chosenPlacement
FlyoutPlacementMode

The actual placement mode used by the invoked FlyoutBase placement logic.

Returns

The bounds as calculated by FlyoutBase placement logic.

Applies to