I want to make a layout that is composed of multiple views and each view has it's own viewmodel.
I also want to implement a ViewModel-first approach. So I want to put some containers in my view that their datacontext is bound to corresponding viewmodel property of the container viewmodel. Then content of the container will load based on a data template written for the bound viewmodel type.
public class CompositVm
{
public FirstPartVm FirstPartVm { get; set; }
public SecondPartVm SecondPartVm { get; set; }
}
I want to know weather nesting viewmodels is a good practice and is it compatible with MVVM design pattern?