Grid.RowDefinitions property

Applies to Windows and Windows Phone

Gets a list of RowDefinition objects defined on this instance of Grid.

Syntax


public RowDefinitionCollection RowDefinitions { get; }


<Grid>
  <Grid.RowDefinitions>
    oneOrMoreRowDefinitions
  </Grid.RowDefinitions>
</Grid>

XAML Values

oneOrMoreRowDefinitions

One or more RowDefinition elements. Each such RowDefinition becomes a placeholder representing a row in the final grid layout.

Property value

Type: RowDefinitionCollection

A list of RowDefinition objects defined on this instance of Grid.

Examples

The following example creates a Grid with three rows. The Height of the first row is set to the value Auto, which distributes height evenly based on the size of the content that is within that row. The height of the second row and third row are set to 2* and * respectively. The second row gets 2/3 of the remaining space and the third row gets 1/3.


<Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="2*" />
    <RowDefinition Height="*"/>
</Grid.RowDefinitions>


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Grid
ColumnDefinitions
Quickstart: Defining layouts

 

 

Show:
© 2014 Microsoft. All rights reserved.