RowDefinitionCollection.Insert(Int32, RowDefinition) 메서드

정의

RowDefinitionRowDefinitionCollection 내의 지정된 인덱스 위치에 삽입합니다.

public:
 virtual void Insert(int index, System::Windows::Controls::RowDefinition ^ value);
public void Insert (int index, System.Windows.Controls.RowDefinition value);
abstract member Insert : int * System.Windows.Controls.RowDefinition -> unit
override this.Insert : int * System.Windows.Controls.RowDefinition -> unit
Public Sub Insert (index As Integer, value As RowDefinition)

매개 변수

index
Int32

컬렉션에서 항목이 삽입되는 위치입니다.

value
RowDefinition

삽입할 RowDefinition입니다.

구현

예외

indexIList의 유효한 인덱스가 아닌 경우

예제

다음 예제에서는 사용 하는 방법에 설명 합니다 Insert 삽입 하는 방법을 RowDefinition 특정 index 내 위치를 RowDefinitionCollection입니다.

private void insertRowAt(object sender, RoutedEventArgs e)
{
    rowDef1 = new RowDefinition();
    grid1.RowDefinitions.Insert(grid1.RowDefinitions.Count, rowDef1);
    tp1.Text = "RowDefinition added at index position " + grid1.RowDefinitions.IndexOf(rowDef1).ToString();
}
Private Sub insertRowAt(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim rowDef1 As New RowDefinition
    grid1.RowDefinitions.Insert(grid1.RowDefinitions.Count, rowDef1)
    tp1.Text = "RowDefinition added at index position " + grid1.RowDefinitions.IndexOf(rowDef1).ToString()
End Sub

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

설명

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

적용 대상

추가 정보