System.Design 2.0.0.0 System.Object System.IDisposable

The abstract class provides a default implementation of undo functionality at design time. An undo unit represents a single unit of undoable work. This unit is added to a stack and the user can then walk the stack to undo each action. Undo units typically are designed to toggle, which means that calling undo twice returns the application to its starting state.

The class takes advantage of the following characteristics of objects running within the designer:

All interesting objects can be persisted to some format by the designer loader.

All objects raise property-change notifications when a property is changed.

offers the idea of transactions, which can be used to fabricate an undo action that spans multiple smaller actions.

With these features, can fabricate any undo units it needs automatically.

Do not change property values directly. The class requires you to use the appropriate to change property values.

monitors for change notifications to create undo units, and the units themselves consist of serialized object states. The following table shows the services that must be available when is created.

Service

Description

Saves property and object values for a component before and after a change is made.

Notifies the undo engine of changes made to components.

Used to track transactions.

Because the class requires and , it is available only at design time.

The undo engine tracks transactions and creates a single undo unit that encompasses a transaction. As a result, the undo engine has control over the duration of an undoable action. Also, because transactions can be named, undoable actions inherit their names from the current transaction. If no transaction is available and a change is reported, the undo engine creates an undo name based on the type of change (for example, "Change property 'Text'").

Specifies generic undo/redo functionality at design time.

- Constructor
  2.0.0.0

  The requires several services from the parameter to be useful.

  Initializes a new instance of the class.

  A parenting service provider.
- Method
  2.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  2.0.0.0
  System.ComponentModel.Design.UndoEngine+UndoUnit `` ``

  The default implementation of the method simply returns a new .

  By default, does nothing with the 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.

  Creates a new .

  A new with a specified name.

  The name of the unit to create. true to create the first of a series of nested units; false to create subsequent nested units.
- Method
  2.0.0.0
  System.Void `` To be added. To be added. To be added.
- Method
  2.0.0.0
  System.Void To be added.

  Releases all resources used by the .

- Method
  2.0.0.0
  System.Void `` To be added.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Property
  2.0.0.0
  System.Boolean To be added. To be added.

  Enables or disables the .

- Method
  2.0.0.0
  System.Object `` To be added.

  Gets the requested service.

  The requested service, if found.

  The type of service to retrieve.
- Method
  2.0.0.0
  System.Object `` To be added.

  Gets the requested service.

  The requested service, or null if the requested service is not found.

  The type of service to retrieve.
- Method
  2.0.0.0
  System.Void `` To be added.

  Raises the event.

  An that contains the event data.
- Method
  2.0.0.0
  System.Void `` To be added.

  Raises the event.

  An that contains the event data.
- Event
  2.0.0.0
  System.EventHandler To be added.

  Occurs immediately before an undo action is performed.

- Property
  2.0.0.0
  System.Boolean To be added. To be added.

  Indicates if an undo action is in progress.

- Event
  2.0.0.0
  System.EventHandler

  The event is always raised, even if an exception is thrown.

  Occurs immediately after an undo action is performed.