2008-05-30 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Fri, 30 May 2008 21:38:06 +0000 (21:38 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Fri, 30 May 2008 21:38:06 +0000 (21:38 -0000)
* ControlBindingsConverter.cs: Fix 1.1 build.

svn path=/trunk/mcs/; revision=104567

mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog
mcs/class/System.Design/System.Windows.Forms.Design/ControlBindingsConverter.cs

index 27f1f3bceeeb1ffa1cf2a78104ef6676e7f9eab7..4e44810cacb344e73b8b68739feea3004957f7a3 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-30  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * ControlBindingsConverter.cs: Fix 1.1 build.
+
 2008-05-30  Ivan N. Zlatev  <contact@i-nz.net>
 
        * ControlBindingsConverter.cs: Implementated just enough to avoid 
index 06eae0653241dd45b60be756a0c09cc9c4377a45..b5dbd6648ca1a40985cb04ccf59aa9cd93717602 100644 (file)
@@ -45,9 +45,14 @@ namespace System.Windows.Forms.Design
                {
                        PropertyDescriptorCollection properties = new PropertyDescriptorCollection (new PropertyDescriptor[0]);
                        ControlBindingsCollection collection = value as ControlBindingsCollection;
-                       if (collection != null && collection.BindableComponent != null) {
+#if NET_2_0
+                       object bindableComponent = collection.BindableComponent;
+#else
+                       object bindableComponent = collection.Control;
+#endif
+                       if (collection != null && bindableComponent != null) {
                                foreach (PropertyDescriptor property in 
-                                        TypeDescriptor.GetProperties (collection.BindableComponent, attributes)) {
+                                        TypeDescriptor.GetProperties (bindableComponent, attributes)) {
                                        if (((BindableAttribute) property.Attributes[typeof (BindableAttribute)]).Bindable)
                                                properties.Add (new DataBindingPropertyDescriptor (property, attributes, true));
                                }