using System;
using System.Windows.Media.Imaging;

namespace MWS.Domain.Common
{
    public class BitmapFactory
    {

        /// <summary>
        /// 解析image资源
        /// </summary>
        /// <returns></returns>
        public static BitmapImage DecodeResource(String imagePath)
        {
            return new BitmapImage(new Uri("pack://application:,,,/Resources/" + imagePath));
        }

    }
}
