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.Co ntrol.ToArgb(). ToString();
bool b = System.Drawing. SystemColors.Co ntrol.IsNamedCo lor; //Returns true
ColorConverter c = new ColorConverter( );
Color clr = (System.Drawing .Color)(c.Conve rtFromString(s) );
bool b2 = clr.IsNamedColo r; //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.Co ntrol.ToArgb(). ToString();
bool b = System.Drawing. SystemColors.Co ntrol.IsNamedCo lor; //Returns true
ColorConverter c = new ColorConverter( );
Color clr = (System.Drawing .Color)(c.Conve rtFromString(s) );
bool b2 = clr.IsNamedColo r; //Returns false
Thanks in advance,
Tim
Comment