Share via


TeachingTip.PreferredPlacement Property

Definition

Preferred placement to be used for the teaching tip. If there is not enough space to show at the preferred placement, a new placement will be automatically chosen. Placement is relative to its target if Target is non-null or to the parent window of the teaching tip if Target is null.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public:
 property TeachingTipPlacementMode PreferredPlacement { TeachingTipPlacementMode get(); void set(TeachingTipPlacementMode value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
TeachingTipPlacementMode PreferredPlacement();

void PreferredPlacement(TeachingTipPlacementMode value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
TeachingTipPlacementMode PreferredPlacement();

void PreferredPlacement(TeachingTipPlacementMode value);
public TeachingTipPlacementMode PreferredPlacement { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")]
public TeachingTipPlacementMode PreferredPlacement { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::TeachingTipPlacementMode::Auto")] set; }
Public Property PreferredPlacement As TeachingTipPlacementMode

Property Value

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarks

Teaching tip replicates Flyout's FlyoutPlacementMode placement behavior with the TeachingTipPlacementMode property. The default placement mode will try to place a targeted teaching tip above its target and a non-targeted teaching tip centered at the bottom of the xaml root. As with Flyout, if the preferred placement mode would not leave room for the teaching tip to show, another placement mode will be automatically chosen.

If you anticipate that your app will be used with gamepad input, please see gamepad and remote control interactions. It is encouraged to test gamepad accessibility of each teaching tip using all possible configurations of an app's UI.

Applies to