private void AttachBitmapSourceEvents(BitmapSource bitmapSource) { DownloadCompletedEventManager.AddHandler(bitmapSource, OnSourceDownloaded); DownloadFailedEventManager.AddHandler(bitmapSource, OnSourceFailed); DecodeFailedEventManager.AddHandler(bitmapSource, OnSourceFailed); _bitmapSource = bitmapSource; }