Represents a stack for managing undo and redo operations in a spreadsheet.
Object
Namespace: Radzen.Blazor.Spreadsheet
Assembly: Radzen.Blazor.dll
public class UndoRedoStackInitializes a new instance of the UndoRedoStack class bound to the worksheet whose commands it batches.
public UndoRedoStack(Documents.Spreadsheet.Worksheet worksheet)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Worksheet | worksheet |
Gets a value indicating whether the redo stack is empty.
public bool CanRedo { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether the redo stack is empty. |
Gets a value indicating whether the undo stack is empty.
public bool CanUndo { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether the undo stack is empty. |
Executes a command and adds it to the undo stack if successful.
public bool Execute(Spreadsheet.ICommand command)
| Type | Name | Description |
|---|---|---|
| Spreadsheet.ICommand | command |
| Type | Description |
|---|---|
| bool |
Redoes the last undone command, moving it back to the undo stack.
public void Redo()Undoes the last executed command, moving it to the redo stack.
public void Undo()Event raised when the undo or redo stacks change.
public event Action Changed