RowDefinition Classe
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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 .../>
- Héritage
- Attributs
Exemples
L’exemple suivant utilise trois ColumnDefinitions et trois RowDefinitions pour créer une grille contenant neuf cellules, comme dans une feuille de calcul. Chaque cellule contient un élément TextBlock qui représente des données, et la ligne supérieure contient un TextBlock avec la propriété ColumnSpan appliquée.
<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>
Constructeurs
| Nom | Description |
|---|---|
| RowDefinition() |
Initialise une nouvelle instance de la classe RowDefinition . |
Propriétés
| Nom | Description |
|---|---|
| ActualHeight |
Obtient une valeur qui représente la hauteur calculée de RowDefinition. |
| Dispatcher |
Retourne |
| DispatcherQueue |
Obtient le |
| Height |
Obtient la hauteur calculée d’un élément RowDefinition ou définit la valeur GridLength d’une ligne définie par RowDefinition. Il s’agit de la propriété de contenu de RowDefinition. |
| HeightProperty |
Identifie la propriété de dépendance Height . |
| MaxHeight |
Obtient ou définit une valeur qui représente la hauteur maximale d’une RowDefinition. |
| MaxHeightProperty |
Identifie la propriété de dépendance MaxHeight . |
| MinHeight |
Obtient ou définit une valeur qui représente la hauteur minimale autorisée d’une RowDefinition. |
| MinHeightProperty |
Identifie la propriété de dépendance MinHeight . |
Méthodes
| Nom | Description |
|---|---|
| ClearValue(DependencyProperty) |
Efface la valeur locale d’une propriété de dépendance. (Hérité de DependencyObject) |
| GetAnimationBaseValue(DependencyProperty) |
Retourne toute valeur de base établie pour une propriété de dépendance, qui s’applique dans les cas où une animation n’est pas active. (Hérité de DependencyObject) |
| GetValue(DependencyProperty) |
Retourne la valeur effective actuelle d’une propriété de dépendance à partir d’un DependencyObject. (Hérité de DependencyObject) |
| ReadLocalValue(DependencyProperty) |
Retourne la valeur locale d’une propriété de dépendance, si une valeur locale est définie. (Hérité de DependencyObject) |
| RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback) |
Inscrit une fonction de notification pour écouter les modifications apportées à une dependencyProperty spécifique sur cette instance DependencyObject . (Hérité de DependencyObject) |
| SetValue(DependencyProperty, Object) |
Définit la valeur locale d’une propriété de dépendance sur un DependencyObject. (Hérité de DependencyObject) |
| UnregisterPropertyChangedCallback(DependencyProperty, Int64) |
Annule une notification de modification qui a été précédemment inscrite en appelant RegisterPropertyChangedCallback. (Hérité de DependencyObject) |