Beispiel #1
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);
         }
     }
 }