Editar

Compartir a través de


RowDefinitionCollection.Count Property

Definition

Gets the total number of items within this instance of RowDefinitionCollection.

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

Property Value

The total number of items in the collection. This property has no default value.

Implements

Examples

The following example demonstrates how to use the Count property.

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

To view the complete sample, see How to: Manipulate Columns and Rows by Using ColumnDefinitionsCollections and RowDefinitionsCollections.

Remarks

RowDefinitionCollection uses a zero-based indexing system.

Applies to

See also