I've a form in Silverlight that shows a list of objects (BusinessListBase) in a datagrid. When I click an edit button on the form a ChildWindow opens and displays the content of the datagrid row. For the ChildWindow and Child Object do you use the MVVM pattern still, and if so, how?
Got any good patterns for this?
I use MVVM when editing a child object from a list. My view model follows the same patterns as Rocky has suggested inheriting the Csla.Xaml.ViewModel class. I pass in both the child object and the root object into the constructor. Within the view model constructor I do a BeginEdit on the root and set the VM model to the child object. I then override the Save and Cancel methods to call either ApplyEdit or CancelEdit. I bind the VM like any normal VM to the child window.
Hope this helps
Does the silverlight version of Project Tracker show this somewhere? I appreciate the help and would like to see an example.
Copyright (c) Marimer LLC