ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Design.Win Assembly / GrapeCity.ActiveReports.Design Namespace / UndoManager Class / Changed Event
Example

In This Topic
    Changed Event (UndoManager)
    In This Topic
    Raised when the Undo stack has changed.
    Syntax
    'Declaration
     
    Public Event Changed As EventHandler
    public event EventHandler Changed
    Remarks
    This event is raised after an undo or redo operation is performed, as well as after the undo/redo history is cleared. It can be used to update UI elements or perform other actions in response to changes in the report's state.
    Example
    This example demonstrates how to dynamically update the enabled state of Undo and Redo buttons based on the current state of the UndoManager.
    designer.UndoManager.Changed += (sender, e) => {
        _undoButton.Enabled = _designer.UndoManager.UndoCount > 0;
        _redoButton.Enabled = _designer.UndoManager.RedoCount > 0;
    };
    See Also