Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Color Code to SolidColor Conversion

0.00/5 (No votes)
3 Jan 2012 1  
Convert color code to SolidColor.
C#
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 + "\" />");
}

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here