語言

ToolBar.Orientation 屬性

定義

獲得 的方向 ToolBar。

public:
 property System::Windows::Controls::Orientation Orientation { System::Windows::Controls::Orientation get(); };
public System.Windows.Controls.Orientation Orientation { get; }
member this.Orientation : System.Windows.Controls.Orientation
Public ReadOnly Property Orientation As Orientation

屬性值

工具列的方向。 預設值為 Horizontal。

範例

以下範例說明如何判斷 a ToolBar 是否為垂直。

if (tb1.Orientation == Orientation.Vertical)
{
    btnText.Content = "This is a vertical toolbar.";
}
If tb1.Orientation = Orientation.Vertical Then
    btnText.Content = "This is a vertical toolbar."
End If

備註

此性質的價值來自父 ToolBarTray節點 。

相依財產資訊

Item 價值觀
識別碼欄位 OrientationProperty
元資料屬性設為 true None

適用於

另請參閱