private Manager() { #region Creates Loading Threads var loaderThreadForThumbnails = new Thread(async() => { await LoaderThreadThumbnails(); }) { IsBackground = true, Priority = ThreadPriority.BelowNormal }; // otherwise, the app won't quit with the UI... loaderThreadForThumbnails.Start(); var loaderThreadForNormalSize = new Thread(async() => { await LoaderThreadNormalSize(); }) { IsBackground = true, Priority = ThreadPriority.BelowNormal }; // otherwise, the app won't quit with the UI... loaderThreadForNormalSize.Start(); #endregion #region Loading Images from Resources var resourceDictionary = new ResourceDictionary { Source = new Uri("Popcorn.ImageLoader;component/Resources.xaml", UriKind.Relative) }; LoadingImage = resourceDictionary["ImageLoading"] as DrawingImage; LoadingImage.Freeze(); ErrorThumbnail = resourceDictionary["ImageError"] as DrawingImage; ErrorThumbnail.Freeze(); #endregion # region Create Loading Animation