aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/CheckBox.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-25 10:35:40 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-25 10:35:40 +0100
commitf927821fd5678a29e6272c7ad4bd95e11957188b (patch)
tree66f9ce9bd202da2946d8fa172ff152b352b4b60f /src/GraphicObjects/CheckBox.cs
parent7fa677c0849677ec8891429ab2c469e38f7d5272 (diff)
use boolean state as svg sub-image in templated controls, solve initial state problem with propertyless bindings
Diffstat (limited to 'src/GraphicObjects/CheckBox.cs')
-rw-r--r--src/GraphicObjects/CheckBox.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs
index 74e4bd7c..fa37c70c 100644
--- a/src/GraphicObjects/CheckBox.cs
+++ b/src/GraphicObjects/CheckBox.cs
@@ -56,16 +56,17 @@ namespace Crow
get { return isChecked; }
set
{
+ if (isChecked == value)
+ return;
+
isChecked = value;
NotifyValueChanged ("IsChecked", value);
- if (isChecked) {
- NotifyValueChanged ("SvgSub", "checked");
+
+ if (isChecked)
Checked.Raise (this, null);
- } else {
- NotifyValueChanged ("SvgSub", "unchecked");
+ else
Unchecked.Raise (this, null);
- }
}
}
public override void onMouseClick (object sender, MouseButtonEventArgs e)