Exemple #1
0
        async void OnSourcePropertyChanging(ImageSource oldvalue, ImageSource newvalue)
        {
            if (oldvalue == null)
            {
                return;
            }

            oldvalue.SourceChanged -= OnSourceChanged;
            await oldvalue.Cancel();
        }
Exemple #2
0
 async static void CancelOldValue(ImageSource oldvalue)
 {
     try
     {
         await oldvalue.Cancel();
     }
     catch (ObjectDisposedException)
     {
         // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792
     }
 }
Exemple #3
0
 public ImageCell()
 {
     Disappearing += (sender, e) =>
     {
         if (ImageSource == null)
         {
             return;
         }
         ImageSource.Cancel();
     };
 }
 public static async void ImageSourceChanging(ImageSource oldImageSource)
 {
     if (oldImageSource == null)
     {
         return;
     }
     try
     {
         await oldImageSource.Cancel().ConfigureAwait(false);
     }
     catch (ObjectDisposedException)
     {
         // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792
     }
 }
Exemple #5
0
        async void OnSourcePropertyChanging(ImageSource oldvalue, ImageSource newvalue)
        {
            if (oldvalue == null)
            {
                return;
            }

            oldvalue.SourceChanged -= OnSourceChanged;
            try
            {
                await oldvalue.Cancel();
            }
            catch (ObjectDisposedException)
            {
                // Workaround bugzilla 37792 https://bugzilla.xamarin.com/show_bug.cgi?id=37792
            }
        }