Show DataWindow in OnViewModelPropertyChanged

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

Hello.

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.

Coordinator
Dec 19, 2012 at 11:24 AM

You are doing a foreach and modify the collection?

Dec 19, 2012 at 12: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.