Files
OpenBullet/OpenBullet/Utils.cs
T
2019-12-21 21:19:33 +01:00

21 lines
672 B
C#

using System.Windows;
using System.Windows.Media;
namespace OpenBullet
{
public static class Utils
{
public static Color GetColor(string propertyName)
{
try { return ((SolidColorBrush)Application.Current.Resources[propertyName]).Color; }
catch { return ((SolidColorBrush)Application.Current.Resources["ForegroundMain"]).Color; }
}
public static SolidColorBrush GetBrush(string propertyName)
{
try { return (SolidColorBrush)Application.Current.Resources[propertyName]; }
catch { return (SolidColorBrush)Application.Current.Resources["ForegroundMain"]; }
}
}
}