Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public GridResizeBehavior ResizeBehavior { get; set; }
/** @property */
public GridResizeBehavior get_ResizeBehavior ()

/** @property */
public void set_ResizeBehavior (GridResizeBehavior value)

public function get ResizeBehavior () : GridResizeBehavior

public function set ResizeBehavior (value : GridResizeBehavior)

<object ResizeBehavior="GridResizeBehavior" .../>

Property Value

The GridResizeBehavior enumeration value that indicates which columns or rows are resized by this GridSplitter control. The default value is BasedOnAlignment.

Identifier field

ResizeBehaviorProperty

Metadata properties set to true

None

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.

The following example shows how to set the ResizeBehavior property.

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

myGridSplitter.ResizeBehavior = GridResizeBehavior.CurrentAndNext;

More Code

How to: Resize Rows with a GridSplitter

This example shows how to use a horizontal GridSplitter to redistribute the space between two rows in a Grid without changing the dimensions of the Grid.

How to: Resize Columns with a GridSplitter

This example shows how to create a vertical GridSplitter in order to redistribute the space between two columns in a Grid without changing the dimensions of the Grid.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft