Partager via


RowDefinitionCollection.Count Propriété

Définition

Obtient le nombre total d’éléments dans cette instance de RowDefinitionCollection.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Valeur de propriété

Nombre total d’éléments de la collection. Cette propriété n’a aucune valeur par défaut.

Implémente

Exemples

L’exemple suivant montre comment utiliser la Count propriété.

private void rowCount(object sender, RoutedEventArgs e)
{
    tp2.Text = "The current number of Rows is: " + grid1.RowDefinitions.Count;
}
Private Sub rowCount(ByVal sender As Object, ByVal e As RoutedEventArgs)
    tp2.Text = "The current number of Rows is: " + grid1.RowDefinitions.Count.ToString()
End Sub

Pour afficher l’exemple complet, consultez How to : Manipulate Columns and Rows by Using ColumnDefinitionsCollections and RowDefinitionsCollections.

Remarques

RowDefinitionCollection utilise un système d’indexation de base zéro.

S’applique à

Voir aussi