@@ -77,7 +77,7 @@ public Color TextColor
7777 }
7878
7979 public static readonly BindableProperty FocusedTextColorProperty =
80- BindableProperty . Create ( nameof ( FocusedTextColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . Gray ) ;
80+ BindableProperty . Create ( nameof ( FocusedTextColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . Transparent ) ;
8181
8282 public Color FocusedTextColor
8383 {
@@ -157,7 +157,7 @@ public Color LabelTextColor
157157 }
158158
159159 public static readonly BindableProperty FocusedLabelTextColorProperty =
160- BindableProperty . Create ( nameof ( FocusedLabelTextColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . Gray ) ;
160+ BindableProperty . Create ( nameof ( FocusedLabelTextColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . Transparent ) ;
161161
162162 public Color FocusedLabelTextColor
163163 {
@@ -228,7 +228,7 @@ public Color BorderColor
228228 }
229229
230230 public static readonly BindableProperty FocusedBorderColorProperty =
231- BindableProperty . Create ( nameof ( FocusedBorderColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . LightGray ) ;
231+ BindableProperty . Create ( nameof ( FocusedBorderColor ) , typeof ( Color ) , typeof ( BaseMaterialFieldControl ) , defaultValue : Color . Transparent ) ;
232232
233233 public Color FocusedBorderColor
234234 {
@@ -387,7 +387,7 @@ private static bool OnAssistiveTextValidate(BindableObject bindable, object valu
387387 protected void SetLabelTextColor ( Label lblLabel )
388388 {
389389 if ( IsControlEnabled )
390- lblLabel . TextColor = IsControlFocused ? FocusedLabelTextColor : LabelTextColor ;
390+ lblLabel . TextColor = IsControlFocused && FocusedLabelTextColor != Color . Transparent ? FocusedLabelTextColor : LabelTextColor ;
391391 else
392392 lblLabel . TextColor = DisabledLabelTextColor ;
393393 }
@@ -399,12 +399,12 @@ private void SetBorderAndBackgroundColors(Frame frmContainer, BoxView bxvLine)
399399 case FieldTypes . Outlined :
400400 case FieldTypes . Filled :
401401 if ( IsControlEnabled )
402- frmContainer . BackgroundColor = IsControlFocused ? FocusedBackgroundColor : BackgroundColorControl ;
402+ frmContainer . BackgroundColor = IsControlFocused && FocusedBackgroundColor != Color . Transparent ? FocusedBackgroundColor : BackgroundColorControl ;
403403 else
404404 frmContainer . BackgroundColor = DisabledBackgroundColor ;
405405
406406 if ( IsControlEnabled )
407- frmContainer . BorderColor = IsControlFocused ? FocusedBorderColor : BorderColor ;
407+ frmContainer . BorderColor = IsControlFocused && FocusedBorderColor != Color . Transparent ? FocusedBorderColor : BorderColor ;
408408 else
409409 frmContainer . BorderColor = DisabledBorderColor ;
410410
@@ -416,7 +416,7 @@ private void SetBorderAndBackgroundColors(Frame frmContainer, BoxView bxvLine)
416416 bxvLine . IsVisible = true ;
417417
418418 if ( IsControlEnabled )
419- bxvLine . Color = IsControlFocused ? FocusedBorderColor : BorderColor ;
419+ bxvLine . Color = IsControlFocused && FocusedBorderColor != Color . Transparent ? FocusedBorderColor : BorderColor ;
420420 else
421421 bxvLine . Color = DisabledBorderColor ;
422422 break ;
0 commit comments