I have 2 list views...and add/remove buttons between them.
On collection changed event of a list-view-collection in viewmodel, can i rollback the changes for a particula
Considering you get the sender of the event as an object (ie. the first parameter of the event) and the list of objects that were modified, yes you can do that. I wouldn't advise that though. If you encounter such a condition, provide a method on the ViewModel which is provided with the EventArgs
, and let it do the work. The view isn't the place to do logic.
Even better: check for the condition in the ViewModel itself (ie in the commands that are responseable for adding/removing)! The viewmodel is responseable for the state of the information, so keep your logic there. The view is just there to display the data.