Dock 列舉

定義

指定 Dock 中子項目的 DockPanel 位置。Specifies the Dock position of a child element that is inside a DockPanel.

public enum class Dock
public enum Dock
type Dock = 
Public Enum Dock
繼承

欄位

Bottom 3

置於 DockPanel 底端的子項目。A child element that is positioned at the bottom of the DockPanel.

Left 0

置於 DockPanel 左邊的子項目。A child element that is positioned on the left side of the DockPanel.

Right 2

置於 DockPanel 右邊的子項目。A child element that is positioned on the right side of the DockPanel.

Top 1

置於 DockPanel 頂端的子項目。A child element that is positioned at the top of the DockPanel.

備註

如果您將 DockPanel. system.windows.controls.dockpanel.lastchildfill 屬性設定為true(這是預設設定), 則 DockPanel 的最後一個子項目一律會填滿剩餘的空間, 而不論您在最後一個子專案上設定的任何其他 dock 值為何。If you set the DockPanel.LastChildFill property to true, which is the default setting, the last child element of a DockPanel always fills the remaining space, regardless of any other dock value that you set on the last child element. 若要在另一個方向停駐子系, 您必須將 DockPanel system.windows.controls.dockpanel.lastchildfill 屬性false設定為, 而且也必須在最後一個子項目上設定明確的 dock 方向。To dock a child in another direction, you must set the DockPanel.LastChildFill property to false and must also set an explicit dock direction on the last child element.

適用於

另請參閱