public void Dispose() { if (SpotlightViewModel != null) { SpotlightViewModel.Dispose(); } if (MoviesViewModel != null) { MoviesViewModel.Dispose(); } if (SeriesViewModel != null) { SeriesViewModel.Dispose(); } if (EpisodesViewModel != null) { EpisodesViewModel.Dispose(); } if (GamesViewModel != null) { GamesViewModel.Dispose(); } if (AlbumsViewModel != null) { AlbumsViewModel.Dispose(); } if (SongsViewModel != null) { SongsViewModel.Dispose(); } if (ArtistsViewModel != null) { ArtistsViewModel.Dispose(); } if (MiniSpotlightsViewModel != null) { MiniSpotlightsViewModel.Dispose(); } if (MiniSpotlightsViewModel2 != null) { MiniSpotlightsViewModel2.Dispose(); } }
protected override void OnNavigatedFrom(NavigationEventArgs e) { _vm.Dispose(); base.OnNavigatedFrom(e); }