/// <summary>
            /// Stop listening to the given source for the event.
            /// </summary>
            protected override void StopListening(object source)
            {
                BitmapSource typedSource = (BitmapSource)source;

                if (typedSource.CheckAccess() && !typedSource.IsFrozen)
                {
                    typedSource.DecodeFailed -= new EventHandler <ExceptionEventArgs>(OnDecodeFailed);
                }
            }
Beispiel #2
0
            // Token: 0x060087C5 RID: 34757 RVA: 0x00250CE0 File Offset: 0x0024EEE0
            protected override void StopListening(object source)
            {
                BitmapSource bitmapSource = (BitmapSource)source;

                if (bitmapSource.CheckAccess() && !bitmapSource.IsFrozen)
                {
                    bitmapSource.DecodeFailed -= this.OnDecodeFailed;
                }
            }
            /// <summary>
            /// Stop listening to the given source for the event.
            /// </summary>
            protected override void StopListening(object source)
            {
                BitmapSource typedSource = (BitmapSource)source;

                if (typedSource.CheckAccess() && !typedSource.IsFrozen)
                {
                    typedSource.DownloadCompleted -= new EventHandler(OnDownloadCompleted);
                }
            }
Beispiel #4
0
 // Token: 0x06004E7F RID: 20095 RVA: 0x00161124 File Offset: 0x0015F324
 private static void OnSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     if (!e.IsASubPropertyChange)
     {
         Image       image        = (Image)d;
         ImageSource imageSource  = (ImageSource)e.OldValue;
         ImageSource imageSource2 = (ImageSource)e.NewValue;
         Image.UpdateBaseUri(d, imageSource2);
         image.DetachBitmapSourceEvents();
         BitmapSource bitmapSource = imageSource2 as BitmapSource;
         if (bitmapSource != null && bitmapSource.CheckAccess() && !bitmapSource.IsFrozen)
         {
             image.AttachBitmapSourceEvents(bitmapSource);
         }
     }
 }