I'm using csla 4.3 and caliburn micro and mef to import all of my viewmodels. I have an Employee object which has 40+ properties and some children lists. I would like to break it up into many smaller viewmodel parts so that its easier to design. Something like EmployeeViewModel, PayRatesPartViewModel, ContactsPartViewModel, etc. But the key is to maintain the EmployeeViewModel as the one to call save.
My first try at this was to use events to pass the EmployeeViewModel.Model which the part viewmodels would subscribe to and maintain a reference to the model. While Binding works for the views, saving changes does not because of an edit level mismatch. (which i assume is because of the multiple binding sources?)
I thought to try holding a weakreference to the model on each part. I dont remember why i abandonded that, but I believe it worked. I'm not too familiar with weakreference and I'm afraid to incorporate something "just because it works". Gotta have some basic understandings, first.
But the multiple binding source feature seems like that might solve my issue. I haven't found much on it except the sample code and a couple of posts referencing it, so i'm not too sure about it.
Will it address my problem? Do I just add the BindingSourceExtensions code and use it as the sample does? Why would I not want to use it?
Bleh. That is for win forms. Is there a wpf alternative? Or am i barking up the wrong tree?
Copyright (c) Marimer LLC