diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-11-05 23:02:49 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-11-05 23:02:49 +0100 |
| commit | 5185d70ddd14728576bafdfea267981baed88d84 (patch) | |
| tree | 28ecf610198dc524f927f953a952cbc7f1717498 /src/GraphicObjects/TemplatedControl.cs | |
| parent | 8d59e42e78db11afaf9b2f6530403a12b1d1926c (diff) | |
| parent | 28788991d650bc8ba29b9c2817dbb757129977e5 (diff) | |
merge
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index ba580dae..c4ef5788 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -62,7 +62,7 @@ namespace Crow if (string.IsNullOrEmpty(_template)) loadTemplate (); else - loadTemplate (currentInterface.Load (_template)); + loadTemplate (CurrentInterface.Load (_template)); } } [XmlAttributeAttribute()][DefaultValue("Templated Control")] @@ -76,6 +76,11 @@ namespace Crow } } #region GraphicObject overrides + public override void Initialize () + { + loadTemplate (); + base.Initialize (); + } public override GraphicObject FindByName (string nameToFind) { //prevent name searching in template @@ -108,7 +113,7 @@ namespace Crow if (template == null) { if (!Interface.DefaultTemplates.ContainsKey (this.GetType ().FullName)) throw new Exception (string.Format ("No default template found for '{0}'", this.GetType ().FullName)); - this.SetChild (currentInterface.Load (Interface.DefaultTemplates[this.GetType ().FullName])); + this.SetChild (CurrentInterface.Load (Interface.DefaultTemplates[this.GetType ().FullName])); }else this.SetChild (template); } |