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级获取其值。

Dependency 属性信息

项目 价值
标识符字段 OrientationProperty
元数据属性设置为 true None

适用于

另请参阅