Height Property
Collapse the table of content
Expand the table of content

RowDefinition.Height Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)
XMLNS for XAML: Not mapped to an xmlns.

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

XAML Values

doubleValue

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

starSizing

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.

Auto

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft