BeginUndoGroup method

ITextDocument.BeginUndoGroup method

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 (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2016 Microsoft