語言

TeachingTip.PreferredPlacement 屬性

定義

教學提示的首選位置。 若首選位置空間不足,將自動選擇新的位置。 如果目標非空,則相對於教學提示的父視窗放置;如果目標為空,則相對於教學提示的父視窗。

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; }
var teachingTipPlacementMode = teachingTip.preferredPlacement;
teachingTip.preferredPlacement = teachingTipPlacementMode;
Public Property PreferredPlacement As TeachingTipPlacementMode

屬性值

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

備註

教學提示透過 TeachingTipPlacementMode 屬性複製 FlyoutPlacementMode 的放置行為。 預設放置模式會將有目標的教學提示嘗試放置在其目標上方,而將無目標的教學提示置於 XAML 根的底部中央。 和 Flyout 一樣,如果慣用放置模式會沒有空間顯示教學提示,系統會自動選擇其他放置模式。

如果您預期應用程式會與遊戲控制器輸入一起使用,請參閱 手把與遙控器的互動。 建議使用應用程式介面的所有可能配置,測試每個教學提示的遊戲控制器無障礙性。

適用於