using System.Windows;
namespace Muchinfo.PC.Common.Helpers
{
public class ResourceHelper
{
///
/// 获取系统资源
///
///
/// Name of the resource.
/// ``0.
public static T GetFromeResource(string resourceName) where T : class
{
try
{
var brush = (T)Application.Current.TryFindResource(resourceName);
if (brush == null) return default(T);
return brush;
}
catch
{
return null;
}
}
}
}