| TextDocumentBeginUpdate Method |
Increments the freeze count. If the freeze count is nonzero, screen updating is disabled.
Namespace: TextObjectModelAssembly: ManagedTOM2 (in ManagedTOM2.dll) Version: 1.0.5577.41188
Syntax public void BeginUpdate()
public:
void BeginUpdate()
Remarks
Disabling screen updating will reduce flicker when performing
several consecutive operations on a range.
Examples
The following example demonstrates how to disable and re-enable screen updating:
void BeginEndUpdateExample(TextDocument document) {
TextRange range = document.EntireRange;
document.BeginUpdate();
for (int i = 0; i < 100; i++) {
range.Text = "Repeated";
range.Collapse(RangePosition.End);
}
document.EndUpdate();
}
See Also