Share via


RowDefinition Classe

Définition

Définit des propriétés spécifiques aux lignes qui s’appliquent aux éléments Grid .

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
Object Platform::Object IInspectable DependencyObject RowDefinition
Attributs

Exemples

L’exemple suivant utilise trois ColumnDefinitions et trois RowDefinitions pour créer une grille qui a 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

RowDefinition()

Initialise une nouvelle instance de la classe RowDefinition.

Propriétés

ActualHeight

Obtient une valeur qui représente la hauteur calculée de RowDefinition.

Dispatcher

Retourne null toujours dans une application SDK d'application Windows. Utilisez DispatcherQueue à la place.

(Hérité de DependencyObject)
DispatcherQueue

Obtient le DispatcherQueue auquel cet objet est associé. DispatcherQueue représente une installation qui peut accéder au DependencyObject sur le thread d’interface utilisateur, même si le code est initié par un thread autre que l’interface utilisateur.

(Hérité de DependencyObject)
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é content 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’un 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’un RowDefinition.

MinHeightProperty

Identifie la propriété de dépendance MinHeight .

Méthodes

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 objet 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 à un DependencyProperty spécifique sur ce 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 précédemment inscrite en appelant RegisterPropertyChangedCallback.

(Hérité de DependencyObject)

S’applique à

Voir aussi