Defines row-specific properties that apply to Grid elements.
Inheritance
- Object
- DependencyObject
- RowDefinition
Syntax
<RowDefinition .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Controls.IRowDefinitionStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The RowDefinition class has these types of members:
Constructors
The RowDefinition class has these constructors.
| Constructor | Description |
|---|---|
| RowDefinition | Initializes a new instance of the RowDefinition class. |
Methods
The RowDefinition class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject) |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
| ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject) |
| SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject) |
Properties
The RowDefinition class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets a value that represents the calculated height of the RowDefinition. | |
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read/write | Gets the calculated height of a RowDefinition element, or sets the GridLength value of a row that is defined by the RowDefinition. | |
| Read-only | Identifies the Height dependency property. | |
| Read/write | Gets or sets a value that represents the maximum height of a RowDefinition. | |
| Read-only | Identifies the MaxHeight dependency property. | |
| Read/write | Gets or sets a value that represents the minimum allowed height of a RowDefinition. | |
| Read-only | Identifies the MinHeight dependency property. |
Examples
The following example uses three ColumnDefinitions and three RowDefinitions to create a grid that has nine cells, such as in a worksheet. Each cell contains a TextBlock element that represents data, and the top row contains a TextBlock with the ColumnSpan property applied.
<Grid VerticalAlignment="Top" HorizontalAlignment="Left" Width="350" Height="200"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold" Grid.ColumnSpan="3" Grid.Row="0">Expenses for 2007</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" FontWeight="Bold" Grid.Row="1" Grid.Column="0">Travel</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" FontWeight="Bold" Grid.Row="1" Grid.Column="1">Office Supplies</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" FontWeight="Bold" Grid.Row="1" Grid.Column="2">Salary</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0">20000</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1">10000</TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2">50000</TextBlock> <TextBlock FontSize="16" FontWeight="Bold" Grid.ColumnSpan="3" Grid.Row="3">Total Expense: 80000</TextBlock> </Grid>
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 3/12/2013