public async Task CleanViewModel() { await App.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() => { _mediaService.Stop(); PlayingType = PlayingType.NotPlaying; IsPlaying = false; TimeTotal = TimeSpan.Zero; #if WINDOWS_PHONE_APP // music clean if (BackgroundMediaPlayer.Current != null && BackgroundMediaPlayer.Current.CurrentState != MediaPlayerState.Stopped) { BackgroundMediaPlayer.Current.Pause(); await App.BackgroundAudioHelper.ResetCollection(ResetType.NormalReset); } #endif await TrackCollection.ResetCollection(); TrackCollection.IsRunning = false; }); }