using System; using System.Windows.Media.Imaging; namespace MuchInfo.Chart.Infrastructure.Helpers { public class ImageHelper { public static BitmapImage GetImage(string imageName) { try { var uri = new Uri("pack://application:,,,/MuchInfo.Chart.Infrastructure;component/Images/" + imageName); var bitmapImage = new BitmapImage(uri); return bitmapImage; } catch { return null; } } } }