aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TemplatedControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
-rw-r--r--src/GraphicObjects/TemplatedControl.cs9
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);
}