diff options
| author | jp <jp_bruyere@hotmail.com> | 2016-02-27 10:03:10 +0100 |
|---|---|---|
| committer | jp <jp_bruyere@hotmail.com> | 2016-02-27 10:03:10 +0100 |
| commit | 79282c00e1cafc15b70c2f07710be8dfe16f2b8e (patch) | |
| tree | c4b070d9454a966e2df5d604552ee0c0d086d7c5 /src/GraphicObjects | |
| parent | 949d8d64ba625cc68dcb2c8a73560ce5e6aab107 (diff) | |
DataSource as full crow property with notify
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 8 |
1 files 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<XmlIgnoreAttribute> () != null) continue; - + if (pi.Name == "DataSource") + continue; // object[] att = pi.GetCustomAttributes (false); // foreach (object o in att) { // XmlIgnoreAttribute xia = o as XmlIgnoreAttribute; |