Hello,
Master section of window contains a DataGrid. Details section displays a form allowing editing of record currently selected in master's DataGrid. Grid's SelectedItem is bound to the master vm. When that property changes, the master vm creates a new EditViewModel, exposing it via a property. The details section of the view uses this property as its DataContext.
When implementing commands like cancel, would you put them in the master or details view model?
The details view model is responsible for the user's interactions with a record. One could argue that this responsibility includes deletion. On the other hand, one could argue that the master view is responsible for user interactions with the collection, and, since deletion is modifying the collection, delete functionality should be placed in it.
Thank you,
Ben
Edit: Clarification--by "implementing commands," I mean implementing the code that asks the service layer to perform the requested action.