Skip to content

Commit 20ad836

Browse files
authored
Merge pull request #211 from bassam8642/master
Repair BackgroundColor , Placeholder Properties in AdvancedEntry
2 parents 64019af + 7026ab4 commit 20ad836

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

InputKit/Shared/Controls/AdvancedEntry.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public string IconImage
143143
/// <summary>
144144
/// BackgroundColor of this Control
145145
/// </summary>
146-
public new Color BackgroundColor { get => (Color)GetValue(IconColorProperty); set => SetValue(IconColorProperty, value); }
146+
public new Color BackgroundColor { get => (Color)GetValue(BackgroundColorProperty); set => SetValue(BackgroundColorProperty, value); }
147147
///------------------------------------------------------------------------
148148
/// <summary>
149149
/// Bordercolor of this control
@@ -169,7 +169,7 @@ public string IconImage
169169
/// <summary>
170170
/// Placeholder of entry
171171
/// </summary>
172-
public string Placeholder { get => txtInput.Placeholder; set { txtInput.Placeholder = value; OnPropertyChanged(nameof(Placeholder)); } }
172+
public string Placeholder { get => (string)GetValue(PlaceholderProperty); set => SetValue(PlaceholderProperty, value); }
173173
/// <summary>
174174
/// Maximum length of this Entry
175175
/// </summary>
@@ -423,7 +423,7 @@ public LabelPosition ValidationPosition
423423
public static readonly BindableProperty BorderColorProperty = BindableProperty.Create(nameof(BorderColor), typeof(Color), typeof(AdvancedEntry), (Color)Frame.BorderColorProperty.DefaultValue, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).frmBackground.BorderColor = (Color)nv);
424424
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(AdvancedEntry), Entry.TextColorProperty.DefaultValue , propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).txtInput.TextColor = (Color)nv);
425425
public static readonly BindableProperty PlaceholderColorProperty = BindableProperty.Create(nameof(PlaceholderColor), typeof(Color), typeof(AdvancedEntry), Color.LightGray, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).PlaceholderColor = (Color)nv);
426-
public static readonly BindableProperty PlaceHolderProperty = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(AdvancedEntry), null, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).Placeholder = (string)nv);
426+
public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(AdvancedEntry), default(string), propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).txtInput.Placeholder = (string)nv);
427427
public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(AdvancedEntry), int.MaxValue, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).MaxLength = (int)nv);
428428
public static readonly BindableProperty MinLengthProperty = BindableProperty.Create(nameof(MinLength), typeof(int), typeof(AdvancedEntry), 0, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).MinLength = (int)nv);
429429
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(AdvancedEntry), (float)Frame.CornerRadiusProperty.DefaultValue, propertyChanged: (bo, ov, nv) => (bo as AdvancedEntry).frmBackground.CornerRadius = (float)nv);
@@ -603,4 +603,4 @@ private protected virtual Entry GetInputEntry()
603603
}
604604
#endregion
605605
}
606-
}
606+
}

0 commit comments

Comments
 (0)