UndoManager.CanUndo() and CanRedo()


#1

I dont get it… Document.UndoManager.CanUndo() CanRedo() always return
false… but the undo redo actually work… what am i doing wrong… i
want to update my menu to reflect the state of the undomanager.

Thanks


#2

The likely problem is that at the time you are trying to update your menu there is a transaction still ongoing.


#3

It would be very nice to have some events like CanUndoChanged etc…


#4

The sample applications do this. For example, in ProtoApp, look how GraphDoc methods call EnableToolBarUndoButtons, as well as when GraphView’s UpdateFormInfo is called.