BindingGroup.BeginEdit 메서드

정의

에서 원본에 대한 편집 트랜잭션을 BindingGroup시작합니다.

public:
 void BeginEdit();
public void BeginEdit();
member this.BeginEdit : unit -> unit
Public Sub BeginEdit ()

예제

다음은 창이 로드되어 편집 트랜잭션을 시작할 때 호출 BeginEdit 하는 예제입니다.

void stackPanel1_Loaded(object sender, RoutedEventArgs e)
{
    // Set the DataContext to a PurchaseItem object.
    // The BindingGroup and Binding objects use this as
    // the source.
    stackPanel1.DataContext = new PurchaseItem();

    // Begin an edit transaction that enables
    // the object to accept or roll back changes.
    stackPanel1.BindingGroup.BeginEdit();
}
Private Sub stackPanel1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Set the DataContext to a PurchaseItem object.
    ' The BindingGroup and Binding objects use this as
    ' the source.
    stackPanel1.DataContext = New PurchaseItem()

    ' Begin an edit transaction that enables
    ' the object to accept or roll back changes.
    stackPanel1.BindingGroup.BeginEdit()
End Sub

설명

지원의 원본이 BindingGroup 보류 중인 변경 내용을 삭제하는 경우 호출 BeginEdit 하여 편집 트랜잭션을 시작하고, 보류 중인 변경 내용을 저장하기 위해 호출 CommitEdit 하고, 보류 중인 변경 내용을 취소하도록 호출 CancelEdit 할 수 있습니다.

구현되는 각 개체에 Items 대해 호출 IEditableObject 합니다.BeginEditIEditableObject.BeginEdit

적용 대상