Share via


TeachingTip.PreferredPlacement 屬性

定義

慣用的位置,用於教學提示。 如果沒有足夠的空間可在慣用的位置顯示,系統會自動選擇新的位置。 如果 Target 為非 Null,則放置位置相對於其目標,如果 Target 為 Null,則相對於教學提示的父視窗。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 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 屬性,複寫 Flyout 的FlyoutPlacementMode 放置行為。 預設放置模式會嘗試將有目標教學提示放置在其目標上方,並將無目標教學提示置中在 XAML 根底部。 和 Flyout 一樣,如果慣用放置模式會沒有空間顯示教學提示,系統會自動選擇其他放置模式。

如果您預期您的應用程式將搭配遊戲台輸入使用,請參閱 遊戲台和遠端控制互動。 建議您測試的使用應用程式 UI 的所有可能設定,測試每個教學提示的遊戲台協助工具。

適用於