ResizeBehavior Property

GridSplitter.ResizeBehavior Property


Gets or sets which columns or rows are resized relative to the column or row for which the GridSplitter control is defined.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public GridResizeBehavior ResizeBehavior { get; set; }

Property Value

Type: System.Windows.Controls.GridResizeBehavior

One of the enumeration values that indicates which columns or rows are resized by this GridSplitter control. The default is GridResizeBehavior.BasedOnAlignment.

To specify a GridSplitter that resizes rows or columns, set the HorizontalAlignment and VerticalAlignment properties. If you cannot achieve the desired behavior by setting the HorizontalAlignment and VerticalAlignment properties, change the ResizeDirection or ResizeBehavior default values. For more information, see How to: Resize Rows with a GridSplitter and How to: Resize Columns with a GridSplitter.

Identifier field


Metadata properties set to true


The following example shows how to set the ResizeBehavior property.

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

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft