diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-06 17:55:41 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-09-06 17:55:41 +0200 |
| commit | 39a9fa35ff36f8bcb3a88679e3658596d2e79b1c (patch) | |
| tree | 2266ea2ff2e0125c46e10b41613f624a1e2f20ac /src/GraphicObjects/TemplatedControl.cs | |
| parent | 004ab2dee65d4b18e20d8999ff644dd197aa1cd8 (diff) | |
rebase master
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index cb14dfd9..7f2e1b87 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -46,9 +46,6 @@ namespace Crow } string _template; - string _itemTemplate; - public Dictionary<string, ItemTemplate> ItemTemplates = new Dictionary<string, Crow.ItemTemplate>();//TODO: dont instantiate if not used - //but then i should test if null in msil gen [XmlAttributeAttribute][DefaultValue(null)] public string Template { get { return _template; } @@ -63,19 +60,7 @@ namespace Crow loadTemplate (CurrentInterface.Load (_template)); } } - [XmlAttributeAttribute][DefaultValue("#Crow.Templates.ItemTemplate.goml")] - public string ItemTemplate { - get { return _itemTemplate; } - set { - if (value == _itemTemplate) - return; - _itemTemplate = value; - - //TODO:reload list with new template? - NotifyValueChanged("ItemTemplate", _itemTemplate); - } - } #region GraphicObject overrides public override GraphicObject FindByName (string nameToFind) { @@ -86,7 +71,7 @@ namespace Crow { //onDraw is overrided to prevent default drawing of background, template top container //may have a binding to root background or a fixed one. - //this allow applying root background to random template component + //this allow applying root background to random template's component gr.Save (); if (ClipToClientRect) { @@ -113,6 +98,7 @@ namespace Crow this.ResolveBindings (); } + //TODO:IXmlSerializable is not used anymore #region IXmlSerializable public override System.Xml.Schema.XmlSchema GetSchema(){ return null; } public override void ReadXml(System.Xml.XmlReader reader) @@ -151,15 +137,15 @@ namespace Crow xr.MoveToElement (); itemTmp = xr.ReadInnerXml (); - if (ItemTemplates == null) - ItemTemplates = new Dictionary<string, ItemTemplate> (); - - using (IMLReader iTmp = new IMLReader (null, itemTmp)) { - ItemTemplates [dataType] = - new ItemTemplate (iTmp.RootType, iTmp.GetLoader (), dataType, datas); - } - if (!string.IsNullOrEmpty (datas)) - ItemTemplates [dataType].CreateExpandDelegate(this); +// if (ItemTemplates == null) +// ItemTemplates = new Dictionary<string, ItemTemplate> (); +// +// using (IMLReader iTmp = new IMLReader (null, itemTmp)) { +// ItemTemplates [dataType] = +// new ItemTemplate (iTmp.RootType, iTmp.GetLoader (), dataType, datas); +// } +// if (!string.IsNullOrEmpty (datas)) +// ItemTemplates [dataType].CreateExpandDelegate(this); continue; } |