What is the best way to submit a window with multiple usercontrols, each with their own viewmodel?
I have a Form, with multiple child controls within it. The form itself has a Viewmodel for its direct controls, and each of the usercontrols have their own viewmodel.
The number of usercontrols differ depending on user selection so will not be the same each time.
The form is submitted in one go with a save button.
Is it a case of upon save click, that I should loop all the usercontrols and save their view models individually via reading their datacontext? Or is there a better way.
Thanks