using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Media.Imaging; namespace Tango.SharedUI.Helpers { /// /// Contains application resource helper methods. /// public static class ResourceHelper { /// /// Gets the application start path. /// /// public static String GetApplicationStartPath() { return AppDomain.CurrentDomain.BaseDirectory; } /// /// Gets an image from the application resources. /// /// The image relative path. /// public static BitmapSource GetImageFromResources(String imagePath) { return new BitmapImage(new Uri(String.Format("pack://application:,,,/{0};component/{1}", Assembly.GetCallingAssembly(), imagePath), UriKind.Absolute)); } } }