From: jpbruyere Date: Mon, 8 Feb 2016 17:34:15 +0000 (+0100) Subject: add checked and unchecked events X-Git-Tag: 0.3~28 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=3dd77aa562c73d5b2ba227f9f7ad7c3ca6456141;p=jp%2Fcrow.git add checked and unchecked events --- diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs index 66e63ce4..141a9887 100644 --- a/src/GraphicObjects/RadioButton.cs +++ b/src/GraphicObjects/RadioButton.cs @@ -26,7 +26,10 @@ namespace Crow #region CTOR public RadioButton() : base(){} #endregion - + + public event EventHandler Checked; + public event EventHandler Unchecked; + #region GraphicObject overrides [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true public override bool Focusable @@ -71,10 +74,13 @@ namespace Crow isChecked = value; NotifyValueChanged ("IsChecked", value); - if (isChecked) + if (isChecked) { NotifyValueChanged ("SvgSub", "checked"); - else + Checked.Raise (this, null); + } else { NotifyValueChanged ("SvgSub", "unchecked"); + Unchecked.Raise (this, null); + } } }