BindingGroup.CancelEdit 메서드

정의

편집 트랜잭션을 종료하고 보류 중인 변경 내용을 삭제합니다.

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

예제

다음 예제에서는 보류 중인 변경 내용을 취소한 다음 다시 편집할 원본을 준비하는 호출을 호출 CancelEditBeginEdit 합니다.

private void Cancel_Click(object sender, RoutedEventArgs e)
{
    // Cancel the pending changes and begin a new edit transaction.
    stackPanel1.BindingGroup.CancelEdit();
    stackPanel1.BindingGroup.BeginEdit();
}
Private Sub Cancel_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Cancel the pending changes and begin a new edit transaction.
    stackPanel1.BindingGroup.CancelEdit()
    stackPanel1.BindingGroup.BeginEdit()
End Sub

설명

이 메서드를 사용하면 원본 개체가 이 작업을 수행하고 편집 트랜잭션을 종료할 수 있는 경우 원본이 보류 중인 변경 내용을 삭제합니다. 그런 다음, 메서드는 저장된 원본 값으로 대상 속성을 업데이트합니다.

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

적용 대상