1111*====================================================================================*/
1212
1313using System ;
14+ using System . ComponentModel ;
1415using System . Globalization ;
1516using System . Windows ;
1617using CSHTML5 . Internal ;
1718
1819namespace OpenSilver . ControlsKit
1920{
21+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
22+ [ Obsolete ( "Deprecated. It will be removed in a future release." ) ]
2023 public class FastCheckBox : FrameworkElement
2124 {
2225 public static readonly DependencyProperty IsCheckedProperty =
@@ -45,7 +48,7 @@ public class FastCheckBox : FrameworkElement
4548 CallPropertyChangedWhenLoadedIntoVisualTree = WhenToCallPropertyChangedEnum . IfPropertyIsSet
4649 } ) ;
4750
48- private object _checkboxHtmlElementRef ;
51+ private INTERNAL_HtmlDomElementReference _checkboxHtmlElementRef ;
4952
5053 private IDisposable _jsCallbackOnClick ;
5154 private object _labelHtmlElementRef ;
@@ -102,7 +105,7 @@ public override object CreateDomElement(object parentRef, out object domElementW
102105 // Trigger click notifications
103106 OnClick ( new RoutedEventArgs
104107 {
105- OriginalSource = this
108+ Source = this
106109 } ) ;
107110 } ) ) ;
108111 // Subscribe to the javascript click event through a simple listener
@@ -111,7 +114,10 @@ public override object CreateDomElement(object parentRef, out object domElementW
111114
112115 INTERNAL_HtmlDomManager . CreateDomElementAppendItAndGetStyle (
113116 "input" ,
114- _labelHtmlElementRef , this , out _checkboxHtmlElementRef ) ;
117+ _labelHtmlElementRef , this , out object checkboxHtmlElementRef ) ;
118+
119+ _checkboxHtmlElementRef = ( INTERNAL_HtmlDomElementReference ) checkboxHtmlElementRef ;
120+
115121 INTERNAL_HtmlDomManager . SetDomElementAttribute ( _checkboxHtmlElementRef , "type" , "checkbox" ) ;
116122
117123 INTERNAL_HtmlDomManager . CreateDomElementAppendItAndGetStyle ( "span" , _labelHtmlElementRef , this ,
@@ -192,21 +198,21 @@ private static void OnIsCheckedChanged(DependencyObject d, DependencyPropertyCha
192198 {
193199 checkbox . OnChecked ( new RoutedEventArgs
194200 {
195- OriginalSource = checkbox
201+ Source = checkbox
196202 } ) ;
197203 }
198204 else if ( newValue == false )
199205 {
200206 checkbox . OnUnchecked ( new RoutedEventArgs
201207 {
202- OriginalSource = checkbox
208+ Source = checkbox
203209 } ) ;
204210 }
205211 else
206212 {
207213 checkbox . OnIndeterminate ( new RoutedEventArgs
208214 {
209- OriginalSource = checkbox
215+ Source = checkbox
210216 } ) ;
211217 }
212218 }
0 commit comments