RowDefinition Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public ref class RowDefinition sealed : DependencyObject
/// [Microsoft.UI.Xaml.Markup.ContentProperty(Name="Height")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RowDefinition final : DependencyObject
[Microsoft.UI.Xaml.Markup.ContentProperty(Name="Height")]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RowDefinition : DependencyObject
Public NotInheritable Class RowDefinition
Inherits DependencyObject
<RowDefinition .../>
- Inheritance
- Attributes
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. |
Properties
ActualHeight |
Gets a value that represents the calculated height of the RowDefinition. |
Dispatcher |
Always returns |
DispatcherQueue |
Gets the |
Height |
Gets the calculated height of a RowDefinition element, or sets the GridLength value of a row that is defined by the RowDefinition. This is the content property of RowDefinition. |
HeightProperty |
Identifies the Height dependency property. |
MaxHeight |
Gets or sets a value that represents the maximum height of a RowDefinition. |
MaxHeightProperty |
Identifies the MaxHeight dependency property. |
MinHeight |
Gets or sets a value that represents the minimum allowed height of a RowDefinition. |
MinHeightProperty |
Identifies the MinHeight dependency property. |
Methods
ClearValue(DependencyProperty) |
Clears the local value of a dependency property. (Inherited from DependencyObject) |
GetAnimationBaseValue(DependencyProperty) |
Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
GetValue(DependencyProperty) |
Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
ReadLocalValue(DependencyProperty) |
Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject) |
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback) |
Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance. (Inherited from DependencyObject) |
SetValue(DependencyProperty, Object) |
Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject) |
UnregisterPropertyChangedCallback(DependencyProperty, Int64) |
Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback. (Inherited from DependencyObject) |