Question

I have a PRISM WPF application; and I have a PatientViewModel that in its constructor subscribes to an event (let's say CultureChangedEvent), and executes an action.

In my main view model I have an ObservableCollection.

If the user removes a PatientViewModel instance from the ObservableCollection, and then a CultureChangedEvent is fired, the removed PatientViewModel is still in memory and receives the event. So currently, when removing a PatientViewModel, I unsubscribe from the event; but I wonder of this is the correct approach? Or am I missing something?

Thanks! L

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top