private void SetImageSource(Bitmap bmp) { using (bmp) { image.Source = ResourceUtilities.ConvertToImageSource(bmp); } }
internal ImageSource LoadIconInternal(string iconKey) { if (cachedIcons.ContainsKey(iconKey)) { return(cachedIcons[iconKey]); } if (resourceAssembly == null) { cachedIcons.Add(iconKey, null); return(null); } ResourceManager rm = new ResourceManager(assemblyName + imagesSuffix, resourceAssembly); ImageSource bitmapSource = null; var source = (Bitmap)rm.GetObject(iconKey); if (source == null) { cachedIcons.Add(iconKey, null); return(null); } bitmapSource = ResourceUtilities.ConvertToImageSource(source); cachedIcons.Add(iconKey, bitmapSource); return(bitmapSource); }
private void SetImageSource(Bitmap bmp) { seeImageView.imageBox2.Source = ResourceUtilities.ConvertToImageSource(bmp); }