BindingGroup.BeginEdit 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
에서 원본에 대한 편집 트랜잭션을 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