How to make an aggregate View Model in MVVM? basically I wanna add multiple ViewModels together. Here is what I have tried.
using System;
using System.Windows.Input;
using Microsoft.VisualStudio.Shell.Interop;
namespace NavigationAssistant
{
internal class NavigationAssistantViewModel
{
private IVsUIShell uiShell;
private IServiceProvider _serviceProvider { get; }
public NavigationAssistantViewModel(IVsUIShell uiShell, IServiceProvider serviceProvider)
{
this.uiShell = uiShell;
this._serviceProvider = serviceProvider;
}
private ICommand changeThemeCommand;
public ICommand ChangeThemeCommand
{
get
{
return this.changeThemeCommand ?? (this.changeThemeCommand = new VSCommand(this._serviceProvider, this.uiShell));
}
}
}
}