RowDefinitionCollection.RemoveAt(Int32) 메서드

정의

RowDefinition에서 지정된 인덱스 위치의 RowDefinitionCollection을 제거합니다.

public:
 virtual void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

매개 변수

index
Int32

컬렉션 내에서 RowDefinition이 제거되는 위치입니다.

구현

예제

다음 예제에서는 사용 하는 방법에 설명 합니다 RemoveAt 제거 하는 방법을 RowDefinitionRowDefinitionCollection 특정 index 위치.

private void removeRow(object sender, RoutedEventArgs e)
{
    if (grid1.RowDefinitions.Count <= 0)
    {
        tp1.Text = "No More Rows to Remove!";
    }
    else
    {
        grid1.RowDefinitions.RemoveAt(0);
    }
}
Private Sub removeRow(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If (grid1.RowDefinitions.Count <= 0) Then
        tp1.Text = "No More Rows to Remove!"
    Else
        grid1.RowDefinitions.RemoveAt(0)
    End If
End Sub

전체 샘플을 보려면 방법: 조작할 열 및 행으로 사용 하 여 ColumnDefinitionsCollections 및 RowDefinitionsCollections합니다.

설명

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

적용 대상

추가 정보