From: jp Date: Sat, 27 Feb 2016 09:03:10 +0000 (+0100) Subject: DataSource as full crow property with notify X-Git-Tag: v0.4~115 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=79282c00e1cafc15b70c2f07710be8dfe16f2b8e;p=jp%2Fcrow.git DataSource as full crow property with notify --- diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index d0219b15..da753b5b 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -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 () != null) continue; - + if (pi.Name == "DataSource") + continue; // object[] att = pi.GetCustomAttributes (false); // foreach (object o in att) { // XmlIgnoreAttribute xia = o as XmlIgnoreAttribute;