WatchThis.Wpf.SlideshowWindow.LoadImage C# (CSharp) Method

LoadImage() public method

public LoadImage ( ImageInformation imageInfo ) : object
imageInfo ImageInformation
return object
      	public object LoadImage(ImageInformation imageInfo)
        {
            var source = new BitmapImage();
            source.BeginInit();
            source.UriSource = new Uri(imageInfo.FullPath);
            source.CacheOption = BitmapCacheOption.OnLoad;
            source.EndInit();

            // To allow the image to be used by the UI thread...
            source.Freeze();
            return source;
        }