private void Sc_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) { if (IsPausedWhileScrolling) { if (e.IsIntermediate) { GifImageSource.PauseAllGifs(); } else { //scroll is stopping GifImageSource.ResumeAllGifs(); } } }
public ListViewTest() { this.DataContext = this; this.InitializeComponent(); #if WINDOWS_APP this.navBackButton.Style = (Style)Resources["NavigationBackButtonNormalStyle"]; this.navBackButton.Visibility = Windows.UI.Xaml.Visibility.Visible; _scrollResumeTimer.Interval = TimeSpan.FromMilliseconds(500); _scrollResumeTimer.Tick += (s, args) => { _scrollResumeTimer.Stop(); GifImageSource.ResumeAllGifs(); }; #elif WINDOWS_PHONE_APP HardwareButtons.BackPressed += HardwareButtons_BackPressed; #endif }
private void Sc_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e) { if (IsPausedWhileScrolling) { #if WINDOWS_APP _scrollResumeTimer.Stop(); _scrollResumeTimer.Start(); GifImageSource.PauseAllGifs(); #else if (e.IsIntermediate) { GifImageSource.PauseAllGifs(); } else { //scroll is stopping GifImageSource.ResumeAllGifs(); } #endif } }