RowDefinition Class
Definition
Defines row-specific properties that apply to Grid elements.
Equivalent WinUI class: Microsoft.UI.Xaml.Controls.RowDefinition.
public ref class RowDefinition sealed : DependencyObject
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.UI.Xaml.Controls.IRowDefinitionStatics, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class RowDefinition sealed : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.UI.Xaml.Controls.IRowDefinitionStatics, 65536, "Windows.Foundation.UniversalApiContract")]
class RowDefinition sealed : DependencyObject
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.UI.Xaml.Controls.IRowDefinitionStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class RowDefinition : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.UI.Xaml.Controls.IRowDefinitionStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class RowDefinition : DependencyObject
Public NotInheritable Class RowDefinition
Inherits DependencyObject
<RowDefinition .../>
- Inheritance
- Attributes
Windows 10 requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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>
Constructors
RowDefinition() |
Initializes a new instance of the RowDefinition class. Equivalent WinUI constructor: Microsoft.UI.Xaml.Controls.RowDefinition.RowDefinition. |
Properties
ActualHeight |
Gets a value that represents the calculated height of the RowDefinition. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.ActualHeight. |
Dispatcher |
Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread. Equivalent WinUI property: Microsoft.UI.Xaml.DependencyObject.Dispatcher. (Inherited from DependencyObject) |
Height |
Gets the calculated height of a RowDefinition element, or sets the GridLength value of a row that is defined by the RowDefinition. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.Height. |
HeightProperty |
Identifies the Height dependency property. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.HeightProperty. |
MaxHeight |
Gets or sets a value that represents the maximum height of a RowDefinition. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.MaxHeight. |
MaxHeightProperty |
Identifies the MaxHeight dependency property. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.MaxHeightProperty. |
MinHeight |
Gets or sets a value that represents the minimum allowed height of a RowDefinition. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.MinHeight. |
MinHeightProperty |
Identifies the MinHeight dependency property. Equivalent WinUI property: Microsoft.UI.Xaml.Controls.RowDefinition.MinHeightProperty. |