/// <summary> /// Handles the PlaybackCompleted event of the PlaybackManager control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param> void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e) { if (e.Player == CurrentPlayer) { if (CurrentPositionTimer != null) { CurrentPositionTimer.Dispose(); } CurrentPlayer.PlayStateChanged -= CurrentPlayer_PlayStateChanged; CurrentPlayer = null; ResetButtonVisibilities(null); Dispatcher.InvokeAsync(() => TxtCurrentPosition.Text = string.Empty); } }
/// <summary> /// Handles the PlaybackCompleted event of the PlaybackManager control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param> void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e) { App.Instance.ApplicationWindow.NavigateBack(); }
/// <summary> /// Handles the PlaybackCompleted event of the PlaybackManager control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="PlaybackStopEventArgs" /> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e) { App.Instance.ApplicationWindow.Dispatcher.Invoke(() => NowPlayingButton.Visibility = Visibility.Collapsed); }