From 79282c00e1cafc15b70c2f07710be8dfe16f2b8e Mon Sep 17 00:00:00 2001 From: jp Date: Sat, 27 Feb 2016 10:03:10 +0100 Subject: [PATCH] DataSource as full crow property with notify --- src/GraphicObjects/GraphicObject.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.47.3