共用方式為


GridSplitter.ResizeDirection 屬性

定義

取得或設定 GridSplitter 控制項是否調整列或欄大小的值。

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

屬性值

GridResizeDirection

其中一個列舉值,指定是否要調整資料列或資料行大小。 預設為 Auto

範例

下列範例會示範如何設定 ResizeDirection 屬性。

myGridSplitter.ResizeDirection = GridResizeDirection.Columns;
myGridSplitter.ResizeDirection = GridResizeDirection.Columns
<GridSplitter ResizeDirection="Columns" Width="5"
              Grid.Column="2"  Grid.RowSpan="2"/>

備註

若要指定 GridSplitter 重設資料列或資料行大小的 ,請設定 HorizontalAlignmentVerticalAlignment 屬性。 如果您無法藉由設定 HorizontalAlignmentVerticalAlignment 屬性來達到所需的行為,請變更 ResizeDirectionResizeBehavior 預設值。 如需詳細資訊,請參閱 How to: Resize Rows with a GridSplitter and How to: Resize Columns with a GridSplitter.

相依性屬性資訊

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

適用於