T
Tim Mulholland
I am having a problem where a color i select, and convert to a string for
storage in an XML file is not being converted back properly. The following
is a small example that illustrates the problem.The color seems to show up
properly, but it has lost its IsNamedColor property. Is it possible to get
this back or is there any different way i should be doing any of this?
string s = System.Drawing.SystemColors.Control.ToArgb().ToString();
bool b = System.Drawing.SystemColors.Control.IsNamedColor; //Returns true
ColorConverter c = new ColorConverter();
Color clr = (System.Drawing.Color)(c.ConvertFromString(s));
bool b2 = clr.IsNamedColor; //Returns false
Thanks in advance,
Tim
storage in an XML file is not being converted back properly. The following
is a small example that illustrates the problem.The color seems to show up
properly, but it has lost its IsNamedColor property. Is it possible to get
this back or is there any different way i should be doing any of this?
string s = System.Drawing.SystemColors.Control.ToArgb().ToString();
bool b = System.Drawing.SystemColors.Control.IsNamedColor; //Returns true
ColorConverter c = new ColorConverter();
Color clr = (System.Drawing.Color)(c.ConvertFromString(s));
bool b2 = clr.IsNamedColor; //Returns false
Thanks in advance,
Tim