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

适用于