Begins a group of document changes.
Some events are suspended until EndUpdate is called, and the UndoStack will group all changes into a single action.
Calling BeginUpdate several times increments a counter, only after the appropriate number of EndUpdate calls the events resume their work.
|C#||Visual Basic||Visual C++|
public void BeginUpdate()
Public Sub BeginUpdate
public: void BeginUpdate()
Here is the order in which events are raised during a document update:
If the insert/remove/replace methods are called without a call to BeginUpdate(), they will call BeginUpdate() and EndUpdate() to ensure no change happens outside of UpdateStarted/UpdateFinished.
There can be multiple document changes between the BeginUpdate() and EndUpdate() calls. In this case, the events associated with EndUpdate will be raised only once after the whole document update is done.
The UndoStack listens to the UpdateStarted and UpdateFinished events to group all changes into a single undo step.
Assembly: ICSharpCode.AvalonEdit (Module: ICSharpCode.AvalonEdit.dll) Version: 220.127.116.1138