Share via


TeachingTip.PreferredPlacement 属性

定义

用于教学提示的首选位置。 如果没有足够的空间显示在首选位置,将自动选择新的放置。 如果 Target 为非 null,则放置相对于其目标;如果 Target 为 null,则相对于教学提示的父窗口。

本文档适用于 Windows 应用 SDKWinUI 的 WinUI 2 for UWP (,请参阅Windows 应用 SDK命名空间) 。

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

属性值

属性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

注解

教学提示通过 TeachingTipPlacementMode 属性复制浮出控件的 FlyoutPlacementMode 放置行为。 默认放置模式尝试将定向教学提示放置在其目标上方,将非定向教学提示置于 xaml 根底部的中心位置。 与浮出控件相同,如果首选放置模式无法留出显示教学提示的空间,将自动选择另一种放置模式。

如果预计你的应用将用于游戏板输入,请参阅 游戏板和远程控制交互。 建议使用一个应用 UI 所有可能的配置对每个教学提示的游戏板辅助功能进行测试。

适用于