I want to XML-Serialize a complex type (class), that has a property of type System.Drawing.Bitmap among others.
/// <
Implement IXmlSerializable and then handle all the serialization details yourself.
Since you say it's a large type and you only have a problem with the bitmap consider doing something like this:
public class BitmapContainer : IXmlSerializable
{
public BitmapContainer() { }
public Bitmap Data { get; set; }
public XmlSchema GetSchema()
{
throw new NotImplementedException();
}
public void ReadXml(XmlReader reader)
{
throw new NotImplementedException();
}
public void WriteXml(XmlWriter writer)
{
throw new NotImplementedException();
}
}
public class TypeWithBitmap
{
public BitmapContainer MyImage { get; set; }
public string Name { get; set; }
}