RowDefinitionCollection.Count Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET