Exemplo n.º 1
0
        async void OnSourcePropertyChanging(ImageSource oldvalue, ImageSource newvalue)
        {
            if (oldvalue == null)
            {
                return;
            }

            oldvalue.SourceChanged -= OnSourceChanged;
            await oldvalue.Cancel();
        }
Exemplo n.º 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
     }
 }
Exemplo n.º 3
0
 public ImageCell()
 {
     Disappearing += (sender, e) =>
     {
         if (ImageSource == null)
         {
             return;
         }
         ImageSource.Cancel();
     };
 }
Exemplo n.º 4
0
 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
     }
 }
Exemplo n.º 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
            }
        }