]> O.S.I.I.S - jp/crow.git/commitdiff
add checked and unchecked events
authorjpbruyere <jp.bruyere@hotmail.com>
Mon, 8 Feb 2016 17:34:15 +0000 (18:34 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Mon, 8 Feb 2016 17:34:15 +0000 (18:34 +0100)
src/GraphicObjects/RadioButton.cs

index 66e63ce42185de02c181270ba13bcae435d8248f..141a9887aab8b2ecd07e5292021b4e4ad936f40d 100644 (file)
@@ -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);
+                               }
             }
         }