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


IToolbarControlDefault.OperationStack Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

IToolbarControlDefault.OperationStack Property

The operation stack used for undo and redo functionality. If present commands can use it to store operations.

[Visual Basic .NET]
Public Property OperationStack As IOperationStack
[C#]
public IOperationStack OperationStack {get; set;}
[C++]
HRESULT get_OperationStack(
  IOperationStack** OperationStack
);
[C++]
HRESULT putref_OperationStack(
  IOperationStack* OperationStack
);
[C++]

Parameters OperationStack [out, retval]
OperationStack is a parameter of type IOperationStack OperationStack [in]
OperationStack is a parameter of type IOperationStack

Product Availability

Available with ArcGIS Engine.

Description

The OperationStack used to manage undo and redo functionality. Operations are added to the operation stack by each item's Command, so that the operation can be rolled forward and then rolled back as desired. For example, when a graphic element is moved, the operation can be undone moving the graphic back to its original location.

By default the OperationStack will return Nothing. Typically, a developer creates a ControlsOperationStack and sets it into the ToolbarControl. 'Undo' and 'Redo' commands can be added to the ToolbarControl to step through the OperationStack.

Whether or not a command makes use of an OperationStack depends upon its implementation. For example, a command to nudge the position of a graphic element will create an object implementing IOperation and add it to the OperationStack using IOperationStack::Do.

Note, that commands that change the IActiveView::Extent do not need to implement an IOperation object, as the extent is automatically stored in the IActiveView::ExtentStack.

See Also

IToolbarControlDefault Interface