J
Joe
Hi
I have a propertygrid that I allow the user to pick a system.color and I
want to save to a file to load later
onto the propertygrid. String and bool values work but I am unable to save
colors
Any suggestions???
Thanks
Serializing code
----------------
XmlSerializer mySerializer = new XmlSerializer(typeof(ExcelProperty));
// To write to a file, create a StreamWriter object.
StreamWriter myWriter = new StreamWriter(sFile);
mySerializer.Serialize(myWriter, this);
PropertyGrid Class
-------------------------
[Category("Header")]
[Description("Backcolor data header row")]
public System.Drawing.Color HeaderBackColor
{
get { return cBackColor; }
set { cBackColor = value; }
}
[Category("Data")]
[Description("Alternate row color data rows")]
public bool AlternateRowColoring
{
get { return bAlternateRow; }
set { bAlternateRow = value; }
}
I have a propertygrid that I allow the user to pick a system.color and I
want to save to a file to load later
onto the propertygrid. String and bool values work but I am unable to save
colors
Any suggestions???
Thanks
Serializing code
----------------
XmlSerializer mySerializer = new XmlSerializer(typeof(ExcelProperty));
// To write to a file, create a StreamWriter object.
StreamWriter myWriter = new StreamWriter(sFile);
mySerializer.Serialize(myWriter, this);
PropertyGrid Class
-------------------------
[Category("Header")]
[Description("Backcolor data header row")]
public System.Drawing.Color HeaderBackColor
{
get { return cBackColor; }
set { cBackColor = value; }
}
[Category("Data")]
[Description("Alternate row color data rows")]
public bool AlternateRowColoring
{
get { return bAlternateRow; }
set { bAlternateRow = value; }
}