aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/MenuItem.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-01-31 15:58:52 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2017-01-31 15:58:52 +0100
commitcfb314bd4fe70c83f43bb254bcc1bdb54b2dc827 (patch)
tree87c1a868c22ad302325cd55a4468a042e1ba437b /src/GraphicObjects/MenuItem.cs
parent177aa594f6a93d4c8c9ee38546f12851782cb838 (diff)
move recurrent 'Caption' property in Templated Control
Diffstat (limited to 'src/GraphicObjects/MenuItem.cs')
-rw-r--r--src/GraphicObjects/MenuItem.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/GraphicObjects/MenuItem.cs b/src/GraphicObjects/MenuItem.cs
index adec326f..b277194e 100644
--- a/src/GraphicObjects/MenuItem.cs
+++ b/src/GraphicObjects/MenuItem.cs
@@ -78,17 +78,10 @@ namespace Crow
NotifyValueChanged ("Command", command);
}
}
- [XmlAttributeAttribute][DefaultValue("MenuItem")]
- public string Caption {
- get { return Command == null ? caption : Command.Caption; }
- set {
- if (caption == value)
- return;
- caption = value;
-
- if (command == null)//raise value changed only if not bound to a command
- NotifyValueChanged ("Caption", caption);
- }
+ [XmlAttributeAttribute]
+ public override string Caption {
+ get { return Command == null ? base.Caption : Command.Caption; }
+ set { base.Caption = value; }
}
[XmlAttributeAttribute]
public Picture Icon {