Show DataWindow in OnViewModelPropertyChanged

Topics: Issues / bugs
Dec 18, 2012 at 9:15 AM
Edited Dec 18, 2012 at 9:15 AM


In ViewModelA there is Property X. ViewModelB is InterestedIn ViewModelA.

When Property X is Changed ViewModelB have to show in the method OnViewModelPropertyChanged a catel:Datawindow with uiVisualizerService.

So I get an InvalidOperationException:

Collection was modified; enumeration operation may not execute.

in the setter of the Property X.

Dec 19, 2012 at 12:24 PM

You are doing a foreach and modify the collection?

Dec 19, 2012 at 1:01 PM

Yes I modify a collection when property changed. But only when I open a Window I get an error. I clear a collection add refill them. But after showing the window.