2007-01-10 Jonathan Pobst <jpobst@novell.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / OwnerDrawPropertyBag.cs
index 8e17c902728df8832dc572a5f5a1e69b405d3526..b2846934cadce694efe3272b0f443c7adf5c584e 100644 (file)
@@ -47,6 +47,23 @@ namespace System.Windows.Forms {
                        this.font = font;
                }
 
+               internal OwnerDrawPropertyBag(SerializationInfo info, StreamingContext context) {
+                       SerializationInfoEnumerator     en;
+                       SerializationEntry              e;
+
+                       en = info.GetEnumerator();
+
+                       while (en.MoveNext()) {
+                               e = en.Current;
+                               switch(e.Name) {
+                                       case "Font": font = (Font)e.Value; break;
+                                       case "ForeColor": fore_color = (Color)e.Value; break;
+                                       case "BackColor": back_color = (Color)e.Value; break;
+                               }
+                       }
+               }
+
+
                public Color ForeColor {
                        get { return fore_color; }
                        set { fore_color = value; }