UndoEngine.CreateUndoUnit(String, Boolean) Method

Definition

Creates a new UndoEngine.UndoUnit.

protected virtual System.ComponentModel.Design.UndoEngine.UndoUnit CreateUndoUnit (string name, bool primary);
protected virtual System.ComponentModel.Design.UndoEngine.UndoUnit CreateUndoUnit (string? name, bool primary);

Parameters

name
String

The name of the unit to create.

primary
Boolean

true to create the first of a series of nested units; false to create subsequent nested units.

Returns

A new UndoEngine.UndoUnit with a specified name.

Remarks

The default implementation of the CreateUndoUnit method simply returns a new UndoEngine.UndoUnit.

By default, UndoEngine does nothing with the primary parameter, but some implementations of undo, such as those involving the COM Microsoft.VisualStudio.OLE.Interop.IOleParentUndoUnit design pattern, may need to identify the difference between a primary unit and its children.

Applies to

מוצר גירסאות
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9