RowDefinitionCollection.Count Propriété
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.
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.