UndoManager.CanUndo() and CanRedo()

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

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

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

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