Grid.RowDefinitions Property

Definition

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

public:
 property RowDefinitionCollection ^ RowDefinitions { RowDefinitionCollection ^ get(); };
RowDefinitionCollection RowDefinitions();
public RowDefinitionCollection RowDefinitions { get; }
var rowDefinitionCollection = grid.rowDefinitions;
Public ReadOnly Property RowDefinitions As RowDefinitionCollection
<Grid>
  <Grid.RowDefinitions>
    oneOrMoreRowDefinitions
  </Grid.RowDefinitions>
</Grid>

Property Value

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.

You can achieve the same result described above with the new succinct Grid syntax or with the original syntax. Both are shown in examples below.

Using succinct syntax:

<Grid RowDefinitions="Auto, 2*, *">
</Grid>

Using original syntax:

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

Applies to

See also