]> O.S.I.I.S - jp/crow.git/commitdiff
DataSource as full crow property with notify
authorjp <jp_bruyere@hotmail.com>
Sat, 27 Feb 2016 09:03:10 +0000 (10:03 +0100)
committerjp <jp_bruyere@hotmail.com>
Sat, 27 Feb 2016 09:03:10 +0000 (10:03 +0100)
src/GraphicObjects/GraphicObject.cs

index d0219b15bad29c54210b9ee835748ae27c3bc05d..da753b5bef817c2fc2d04d29f3cafe0dcde5d825 100644 (file)
@@ -420,7 +420,8 @@ namespace Crow
                                RegisterForLayouting (LayoutingType.Sizing);
                        }
                }
-               [XmlIgnore]public virtual object DataSource {
+               [XmlAttributeAttribute][DefaultValue(null)]
+               public virtual object DataSource {
                        set {
                                if (dataSource == value)
                                        return;
@@ -432,6 +433,8 @@ namespace Crow
 
                                if (dataSource != null)
                                        this.ResolveBindings();
+
+                               NotifyValueChanged ("DataSource", dataSource);
                        }
                        get {                           
                                return dataSource == null ? LogicalParent == null ? null :
@@ -1610,7 +1613,8 @@ namespace Crow
 
                                if (pi.GetCustomAttribute<XmlIgnoreAttribute> () != null)
                                        continue;
-
+                               if (pi.Name == "DataSource")
+                                       continue;
 //                             object[] att = pi.GetCustomAttributes (false);
 //                             foreach (object o in att) {
 //                                     XmlIgnoreAttribute xia = o as XmlIgnoreAttribute;