public MainViewModel( ILayoutService layoutService, IPlaybarViewModel playbarViewModel, IPlaylistCollectionViewModel playlistCollectionViewModel, ITrackFoldersViewModel trackFoldersViewModel, IPlaylistEditorViewModel playlistEditorViewModel, ISettingsViewModel settingsViewModel ) { AppLayout = layoutService.AppLayout; PlaybarViewModel = playbarViewModel; Items.Add(playlistCollectionViewModel); Items.Add(trackFoldersViewModel); Items.Add(playlistEditorViewModel); Items.Add(settingsViewModel); SelectMainView(); }
public MainViewModel( IViewModelFactory viewModelFactory, ILayoutService layoutService, IPlaybarViewModel playbarViewModel, IPlaylistCollectionViewModel playlistCollectionViewModel, ISettingsViewModel settingsViewModel, ITrackFoldersViewModel trackFoldersViewModel ) { _viewModelFactory = viewModelFactory; AppLayout = layoutService.AppLayout; PlaybarViewModel = playbarViewModel; Items.Add(playlistCollectionViewModel); Items.Add(null); // At index = 1, select IPlaylistEditorViewModel which is lazily instantiated Items.Add(settingsViewModel); Items.Add(trackFoldersViewModel); SelectView(0); ActivateItem(PlaybarViewModel); }