GoXam for WPF v3
EndTransaction Method
Northwoods.GoXam.Model Namespace > UndoManager Class : EndTransaction Method
true to terminate the transaction normally; false to abort it and rollback the existing edits
the internal locale-neutral name for the transaction
Stop the current transaction, either rolling it back or committing it.
Syntax
protected virtual bool EndTransaction( 
   bool commit,
   string tname
)

Parameters

commit
true to terminate the transaction normally; false to abort it and rollback the existing edits
tname
the internal locale-neutral name for the transaction

Return Value

true for a committed top-level transaction
Remarks

If this call stops a top-level transaction, a value of false for commit just undoes and discards the information in the CurrentEdit. If commit is true for a top-level transaction, we mark the CurrentEdit complete, call CommitCompoundEdit, and add the resulting UndoManager.CompoundEdit to the list of compound edits that this undo manager is recording.

Committing a transaction when there have been some undos without corresponding redos will throw away the compound edits holding changes that happened after the current state, before adding this new compound edit to the undo manager's list of edits.

This method raises a Changed event for each of this undo manager's Models, with a hint of ModelChange.CommittedTransaction, and with a OldValue that is the UndoManager.CompoundEdit that has been added to the list of CompoundEdits. Similarly, if the transaction is aborted, either because commit is false or because there is no CurrentEdit to commit, all of the Models get a ModelChange.RolledBackTransaction Changed event. The values passed in the ModelChangedEventArgs may all be null, however.

See Also

Reference

UndoManager Class
UndoManager Members