mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
21 lines
672 B
C#
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"]; }
|
|
}
|
|
}
|
|
}
|