ToolBarTray.Orientation 屬性

定義

指定 ToolBarTray 的方向。

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 值。 預設值為 Horizontal

範例

下列範例示範如何使用 Orientation 屬性來設定工具列匣的方向;這會決定工具列的方向。

<ToolBarTray Orientation="Vertical" 
             Background="White" >
  <ToolBar Band="1" BandIndex="1">
    <Button>
      <Image Source="toolbargraphics\copy.bmp" />
    </Button>
    <Button>
      <Image Source="toolbargraphics\paste.bmp" />
    </Button>
  </ToolBar>
  <ToolBar Band="2" BandIndex="1">
    <Button>
      <Image Source="toolbargraphics\undo.bmp" />
    </Button>
    <Button>
      <Image Source="toolbargraphics\redo.bmp" />
    </Button>
  </ToolBar>
</ToolBarTray>

備註

相依性屬性資訊

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

適用於

另請參閱