diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-10 16:10:18 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-10 16:10:18 +0200 |
| commit | 04f0def856c8ff46ad63cd5976a1299c0b91ac44 (patch) | |
| tree | 274f83dc92712d8352b7949551e9eefcb66ad291 /src/GraphicObjects/Checkbox.cs | |
| parent | 73c7ac95b12d72bcb3f5d549c76bdf0b5a093847 (diff) | |
- template attribute (in xml, and in c# for default one
Diffstat (limited to 'src/GraphicObjects/Checkbox.cs')
| -rw-r--r-- | src/GraphicObjects/Checkbox.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GraphicObjects/Checkbox.cs b/src/GraphicObjects/Checkbox.cs index d36f1266..0e20ddb7 100644 --- a/src/GraphicObjects/Checkbox.cs +++ b/src/GraphicObjects/Checkbox.cs @@ -16,6 +16,7 @@ using System.ComponentModel; namespace go
{
+ [DefaultTemplate("#go.Templates.Checkbox.goml")]
public class Checkbox : TemplatedControl
{
Label _caption;
@@ -24,13 +25,13 @@ namespace go public Checkbox() : base()
{
}
-
+ protected override void loadDefaultValues ()
+ {
+ base.loadDefaultValues ();
+ }
protected override void loadTemplate(GraphicObject template = null)
{
- if (template == null)
- this.SetChild (Interface.Load ("#go.Templates.Checkbox.goml", this));
- else
- this.SetChild (template);
+ base.loadTemplate (template);
_caption = this.child.FindByName ("Caption") as Label;
_image = this.child.FindByName ("Image") as Image;
|