This project is read-only.


events for IUndoRedoMember (on undo/redo)


Sometimes it would be nice to be able to be notified when an UndoRedoMember has been changed by an undo or redo event
Closed Jul 15, 2011 at 6:18 AM by SergeiArhipenko
Released in v1.0


SergeiArhipenko wrote Sep 2, 2008 at 10:45 AM

First of all I will tell how to write custom code to solve this problem:
You could inherit from UndoRedo class, override Undo & Redo metohds and insert firing the event (lets name it PropertyChanged).
But it is a really dangerous thing because subscriber can access other data members that has not been undone yet inside the given command. So, I recomend subscriber of PropertyChanged to simply set an internal flag "that that property changed". And check this flag inside the handler of CommandDone event where data consistency guarantied. And do not forget turn off the flag there.

I am (slowly) working on general solution where firing PropertyChanged will be inherently postponed till the point where all data is in consistent state. So no flags will be required and, besides, WPF developers will be delighted.

wrote Sep 3, 2008 at 6:03 PM

wrote Sep 3, 2008 at 8:23 PM

wrote Jul 15, 2011 at 6:18 AM

wrote Feb 13, 2013 at 11:58 PM

wrote May 16, 2013 at 5:53 AM