Color Code to SolidColor Conversion





4.00/5 (1 vote)
Convert color code to SolidColor.
public SolidColorBrush GetColor(string ColorCode)
{
return (SolidColorBrush)XamlReader.Load("<SolidColorBrush xmlns=\"http://schemas." +
"microsoft.com/winfx/2006/xaml/presentation\ <http://schemas." +
"microsoft.com/winfx/2006/xaml/presentation/> " Color=\"" + ColorCode + "\" />");
}