This document is archived and information here might be outdated.  Recommended version.


IOperationStack Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > SystemUI > ESRI.ArcGIS.SystemUI > Interfaces > IO > IOperationStack Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (SystemUI)  

IOperationStack Interface

Provides access to members that control the Operation Stack.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

An application can implement an OperationStack to provide undo and redo facilities. As you carry out operations, they are added to the stack, then you can use undo and redo in the application to manipulate the stack to undo or redo the operations.

Members

Name Description
Read-only property Count The number of operations on the stack.
Method Do Performs the given operation and places it on the stack.
Read-only property Item The operation at the specified index.
Method Redo Redoes the next operation on the stack.
Read-only property RedoOperation Redoes a specified operation.
Method Remove Removes an operation from the stack.
Method Reset Removes all operations from the stack.
Method Undo Undoes the previous operation on the stack.
Read-only property UndoOperation Undoes a specified operation.

CoClasses that implement IOperationStack

CoClasses and Classes Description
ControlsOperationStack Use this class to provide operation support to the ToolbarControl.

Remarks

ArcMap has an OperationStack, which can be obtained with the IMxDocument::OperationStack property. ArcMap’s buttons and tools wrap their actions in an operation and add the operations to the stack.

Depending on your scenario, there are different methodologies for creating an operation and adding it to the OperationStack.