Occurs when the undo or redo buffer changes.
public event EventHandler UndoRedoChanged
Public Event UndoRedoChanged As EventHandler
public:
event EventHandler^ UndoRedoChanged
This event will be fired when the undo/redo buffer changes. This gives the application a chance to update the user interface if needed.
The undo/redo buffer changes whenever an object inside the Container changes either by user interaction through the user interface or by code.
You can use the [CanUndo](annautomation-canundo] and [CanRedo](annautomation-canredo] property to determine whether this AnnAutomation can undo or redo an operation.
For more information, refer to Undoing Automation Operations (Deprecated).
This example updates an Undo and Redo menu handler's status.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
using Leadtools.Drawing;
public void AnnAutomation_UndoRedoChanged(AnnAutomationManager manager)
{
// subscribe to the UndoRedoChanged event of all automations
foreach (AnnAutomation automation in manager.Automations)
automation.UndoRedoChanged += new EventHandler(automation_UndoRedoChanged);
}
private void automation_UndoRedoChanged(object sender, EventArgs e)
{
AnnAutomation automation = sender as AnnAutomation;
// assume _menuItemUndo is the Undo menu, and _menuItemRedo is the Redo menu
_menuItemUndo.Enabled = automation.CanUndo;
_menuItemRedo.Enabled = automation.CanRedo;
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Drawing
Public Sub AnnAutomation_UndoRedoChanged(ByVal manager As AnnAutomationManager)
' subscribe to the UndoRedoChanged event of all automations
For Each automation As AnnAutomation In manager.Automations
AddHandler automation.UndoRedoChanged, AddressOf automation_UndoRedoChanged
Next automation
End Sub
Private Sub automation_UndoRedoChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim automation As AnnAutomation = CType(IIf(TypeOf sender Is AnnAutomation, sender, Nothing), AnnAutomation)
' assume _menuItemUndo is the Undo menu, and _menuItemRedo is the Redo menu
_menuItemUndo.Enabled = automation.CanUndo
_menuItemRedo.Enabled = automation.CanRedo
End Sub
Products |
Support |
Feedback: UndoRedoChanged Event - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.