GridSplitter.ResizeBehavior 属性

定义

获取或设置哪些列或行要相对于 GridSplitter 控件针对其进行定义的列或行调整其大小。

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

属性值

GridResizeBehavior

一个枚举值,该值指示哪些列或行由 GridSplitter 控件调整大小。 默认值为 BasedOnAlignment

示例

下面的示例演示如何设置 ResizeBehavior 属性。

myGridSplitter.ResizeBehavior = GridResizeBehavior.CurrentAndNext;
myGridSplitter.ResizeBehavior = GridResizeBehavior.CurrentAndNext
<GridSplitter ResizeBehavior="CurrentAndNext" Width="5"
              Grid.Column="3"  Grid.RowSpan="2"/>

注解

若要指定 GridSplitter 调整行或列的大小,请设置 HorizontalAlignmentVerticalAlignment 属性。 如果无法通过设置 HorizontalAlignmentVerticalAlignment 属性来实现所需的行为,请更改 ResizeDirectionResizeBehavior 默认值。 有关详细信息,请参阅 How to: Resize Rows with a GridSplitter and How to: Resize Columns with a GridSplitter.

依赖项属性信息

标识符字段 ResizeBehaviorProperty
元数据属性设置为 true

适用于