ScrollBar.Orientation 屬性

定義

取得或設定 ScrollBar 會以水平或垂直方式顯示。

public:
 property System::Windows::Controls::Orientation Orientation { System::Windows::Controls::Orientation get(); void set(System::Windows::Controls::Orientation value); };
public System.Windows.Controls.Orientation Orientation { get; set; }
member this.Orientation : System.Windows.Controls.Orientation with get, set
Public Property Orientation As Orientation

屬性值

Orientation

Orientation 列舉值,定義會以水平或垂直方式顯示 ScrollBar。 預設為 Vertical

範例

下列範例示範如何設定 Orientation 控制項的 屬性 ScrollBar

myScrollBar.Orientation = Orientation.Horizontal;
myScrollBar.Orientation = Orientation.Horizontal
<ScrollBar Name="myScrollBar" Orientation="Horizontal"/>

備註

相依性屬性資訊

識別碼欄位 OrientationProperty
設定為 的中繼資料屬性 true

適用於

另請參閱