ITextDocument.BeginUndoGroup method

Applies to Windows and Windows Phone

Turns on undo grouping.

Syntax


void BeginUndoGroup()

Parameters

This method has no parameters.

Remarks

An undo group collects undo anti-events for editing changes even when additional undo groups would normally be created. For example, typing anti-events are normally grouped into a single undo group that can be undone with a single Ctrl+Z key combination. A paste or change in insertion point terminates the current undo group and starts another. After you call BeginUndoGroup, such terminations do not occur; only one undo group is used until you call the EndUndoGroup method. The entire group is undone by a single Ctrl+Z key combination.

When undo grouping is on:

  • The undo manager adds undo anti-events for text changes to the current undo group.
  • A single undo command executes all of the undo anti-events in the undo group. This restores the text state to the one that was active when undo grouping was turned on.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

See also

ITextDocument
ITextDocument.EndUndoGroup

 

 

Show:
© 2014 Microsoft