Mandator Erweitert + Setting Page Anbindung
This commit is contained in:
@@ -78,5 +78,18 @@ namespace BS.Shared.Extensions
|
||||
}
|
||||
|
||||
public static bool IsBrighter(this Color c, double threshold) => c.GetBrightness() > threshold;
|
||||
|
||||
public static Color Parse(string str)
|
||||
{
|
||||
return (Color)ColorConverter.ConvertFromString(str);
|
||||
}
|
||||
|
||||
public static SolidColorBrush ParseSolidColorBrush(string str)
|
||||
{
|
||||
if (str is null)
|
||||
return null;
|
||||
|
||||
return (SolidColorBrush)new BrushConverter().ConvertFrom(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user