private void RaiseSkipEvent(UtilityEnum.Direction direction) { SkipRoutedEventArgs newEventArgs = new SkipRoutedEventArgs(SkipControl.SkipEvent) { Direction = direction }; RaiseEvent(newEventArgs); }
void MediaPlayer_SkippingAhead(object sender, SkipRoutedEventArgs e) { if (e.Position == MediaPlayer.LivePosition.GetValueOrDefault(MediaPlayer.EndTime) && CurrentPlaylistItemIndex < Playlist.Count - 1) { GoToNextPlaylistItem(); e.Canceled = true; } }
void MediaPlayer_SkippingBack(object sender, SkipRoutedEventArgs e) { if (e.Position == MediaPlayer.StartTime && (!SkipBackThreshold.HasValue || MediaPlayer.VirtualPosition.Subtract(MediaPlayer.StartTime) < SkipBackThreshold.Value) && CurrentPlaylistItemIndex > 0) { GoToPreviousPlaylistItem(); e.Canceled = true; } }