RowDefinition.Height Property

Gets the calculated height of a RowDefinition element, or sets the GridLength value of a row that is defined by the RowDefinition.

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

public GridLength Height { get; set; }
<RowDefinition Height="doubleValue"/>
- or -
<RowDefinition Height="starSizing"/>
<RowDefinition Height="Auto"/>

XAML Values


The row's height, expressed as a floating-point value for a pixel count. Typically this is specified as an integer, although interpolation of floating-point values is supported by grid layout.


A convention by which you can size rows or columns to take the remaining available space in a Grid. A star sizing always includes the asterisk character (*), and optionally precedes the asterisk with an integer value that specifies a weighted factor versus other possible star sizings (for example, 3*). For more information about star sizing, see Grid.


The row's height, described by the literal Auto. For more information about Auto sizing, see Grid.

Property Value

Type: System.Windows.GridLength
The GridLength that represents the height of the row. The default value is 1.0.

Dependency property identifier field: HeightProperty

The default GridUnitType is Star.

When you use these values in the same code example, the MinHeight value takes precedence over the MaxHeight value, which in turn takes precedence over the Height value.

When you add or remove rows or columns, the ActualWidth for all ColumnDefinition elements and the ActualHeight of all RowDefinition elements become zero until Measure is called.


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions