RowDefinitionCollection.Insert(Int32, RowDefinition) 메서드

정의

RowDefinition 지정된 인덱스 위치에 삽입합니다 RowDefinitionCollection.

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 .

구현

예외

index가 .에서 유효한 인덱스가 아닌 경우 IList

예제

다음 예제에서는 메서드를 사용하여 내의 InsertRowDefinition 특정 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부터 시작하는 인덱싱 시스템을 사용합니다.

적용 대상

추가 정보