Share via


ColorPicker.Orientation 屬性

定義

取得或設定 ColorPicker中編輯控制項的方向。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

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

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

屬性值

ColorPicker 中編輯控制項的方向。 預設值為 Vertical

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

備註

當 屬性 Orientation 設定為 Horizontal 時,ColorPicker 將不會套IsMoreButtonEnabled 屬性。 相反地,文字輸入欄位一律會顯示在 ColorPicker 的側邊。

水準方向文字輸入邊界

當處於 Horizontal 模式且文字輸入欄位正在使用中時,文字輸入欄位右邊會有 的 122px 邊界。 此邊界會考慮欄位標籤的不同當地語系化,並確保不會截斷這些標籤。 此邊界取決於 ColorPickerTextInputHorizontalOrientationMargin 輕量型樣式資源。

  • 如果您的應用程式僅適用于英文版,您可以覆寫此資源,並將右邊界設定為 , 74px 以改善控制項的水準使用量。
  • 當 設定為 VerticalOrientation ,資源沒有任何作用。

適用於

另請參閱