@@ -220,7 +220,7 @@ public LabelPosition LabelPosition
220220#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
221221 public static readonly BindableProperty ColorProperty = BindableProperty . Create ( nameof ( Color ) , typeof ( Color ) , typeof ( CheckBox ) , GlobalSetting . Color , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . UpdateColors ( ) ) ;
222222 public static readonly BindableProperty TextColorProperty = BindableProperty . Create ( nameof ( TextColor ) , typeof ( Color ) , typeof ( CheckBox ) , GlobalSetting . TextColor , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . TextColor = ( Color ) nv ) ;
223- public static readonly BindableProperty IconColorProperty = BindableProperty . Create ( nameof ( IconColor ) , typeof ( Color ) , typeof ( CheckBox ) , GlobalSetting . Color , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . UpdateColors ( ) ) ;
223+ public static readonly BindableProperty IconColorProperty = BindableProperty . Create ( nameof ( IconColor ) , typeof ( Color ) , typeof ( CheckBox ) , Colors . Transparent , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . UpdateColors ( ) ) ;
224224 public static readonly BindableProperty IsCheckedProperty = BindableProperty . Create ( nameof ( IsChecked ) , typeof ( bool ) , typeof ( CheckBox ) , false , BindingMode . TwoWay , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . ApplyIsCheckedAction ( bo as CheckBox , ( bool ) nv ) ) ;
225225 public static readonly BindableProperty IsDisabledProperty = BindableProperty . Create ( nameof ( IsDisabled ) , typeof ( bool ) , typeof ( CheckBox ) , false , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . IsDisabled = ( bool ) nv ) ;
226226 public static readonly BindableProperty KeyProperty = BindableProperty . Create ( nameof ( Key ) , typeof ( int ) , typeof ( CheckBox ) , 0 , propertyChanged : ( bo , ov , nv ) => ( bo as CheckBox ) . Key = ( int ) nv ) ;
@@ -282,17 +282,14 @@ void UpdateColors()
282282 {
283283 frmBackground . BorderColor = Color ;
284284 frmBackground . BackgroundColor = IsChecked ? Color : Colors . Transparent ;
285+ imgSelected . FillColor = Color . ToSurfaceColor ( ) ;
285286 }
286287 else
287288 {
288289 frmBackground . BorderColor = IsChecked ? Color : BorderColor ;
289290 frmBackground . BackgroundColor = BoxBackgroundColor ;
291+ imgSelected . FillColor = IconColor == Colors . Transparent ? Color : IconColor ;
290292 }
291-
292- imgSelected . FillColor =
293- IconColor == frmBackground . BackgroundColor ?
294- IconColor . ToSurfaceColor ( ) :
295- IconColor ;
296293 }
297294
298295 void UpdateBorderColor ( )
0 commit comments