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 です。

次の例は、 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から値を取得します。

依存関係プロパティ情報

品目 価値
識別子フィールド OrientationProperty
に設定されたメタデータ プロパティ true None

適用対象

こちらもご覧ください