System.Drawing.Color objects apparently won\'t serialize with XmlSerializer. What is the best way to xml serialize colors?
Final working version:
Color clrGrid = Color.FromArgb(0, 0, 0);
[XmlIgnore]
public Color ClrGrid
{
get { return clrGrid; }
set { clrGrid = value; }
}
[XmlElement("ClrGrid")]
public string ClrGridHtml
{
get { return ColorTranslator.ToHtml(clrGrid); }
set { ClrGrid = ColorTranslator.FromHtml(value); }
}