private static void AnimatorError(object sender, AnimationErrorEventArgs e) { #if WPF var source = e.Source as UIElement; source?.RaiseEvent(e); #elif WINRT || SILVERLIGHT Error?.Invoke(e.Source, e); #endif }
internal static void OnError(object sender, Exception exception, AnimationErrorKind kind) { EventHandler <AnimationErrorEventArgs> handler = Error; if (handler != null) { var e = new AnimationErrorEventArgs(exception, kind); handler(sender, e); } }
internal static void OnError(Image image, Exception exception, AnimationErrorKind kind) { // ISSUE: reference to a compiler-generated field EventHandler <AnimationErrorEventArgs> error = AnimationBehavior.Error; if (error == null) { return; } Image image1 = image; AnimationErrorEventArgs e = new AnimationErrorEventArgs(exception, kind); error(image1, e); }
private void AnimationBehavior_OnError(DependencyObject d, AnimationErrorEventArgs e) { if (e.Kind == AnimationErrorKind.Loading) IsDownloading = false; MessageBox.Show($"An error occurred ({e.Kind}): {e.Exception}"); }
private static void AnimatorError(object sender, AnimationErrorEventArgs e) { var source = e.Source as UIElement; source?.RaiseEvent(e); }
private void backgroundImage_Error(DependencyObject d, AnimationErrorEventArgs e) { this.iterationCount = 0; this.GifUrl = this.giphyDataSource.GetNextGif(); System.Diagnostics.Debug.WriteLine($"An error occurred ({e.Kind}): {e.Exception}"); }