다음을 통해 공유


RowDefinitionCollection.Count 속성

정의

이 인스턴스 내의 총 항목 수를 가져옵니다 RowDefinitionCollection.

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

속성 값

컬렉션의 총 항목 수입니다. 이 속성에는 기본값이 없습니다.

구현

예제

다음 예제에서는 속성을 사용 하는 방법을 보여 줍니다 Count .

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

전체 샘플을 보려면 방법: ColumnDefinitionsCollections 및 RowDefinitionsCollections를 사용하여 열 및 행 조작을 참조하세요.

설명

RowDefinitionCollection 는 0부터 시작하는 인덱싱 시스템을 사용합니다.

적용 대상

추가 정보