private static void OnReadOnlyTextColorChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.ReadOnlyTextColor = (Color)newValue; } }
private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.RequiredMessage = (string)newValue; } }
private static void OnReadOnlyPlaceholderChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.ReadOnlyPlaceholder = (string)newValue; } }
private static void OnAsPasswordChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.fieldValue.IsPassword = (bool)newValue; } }
private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.SetVisibility((bool)newValue); } }
private static void OnBkgColorChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.fieldPanel.BackgroundColor = (Color)newValue; } }
private static void OnEntryMarginChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.fieldValue.Margin = (Thickness)newValue; thisctrl.fieldValueDisplay.Margin = (Thickness)newValue; } }
private static void OnPlaceHolderChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { if (newValue != null) { thisctrl.fieldValue.Placeholder = (string)newValue; } } }
private static void OnKeyboardTypeChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { if (newValue != null) { switch (newValue.ToString()) { case "Chat": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Chat; break; case "Default": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Default; break; case "Email": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Email; break; case "Numeric": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Numeric; break; case "Plain": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Plain; break; case "Telephone": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Telephone; break; case "Text": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Text; break; case "Url": thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Url; break; default: thisctrl.fieldValue.Keyboard = Xamarin.Forms.Keyboard.Default; break; } } } }
private static void OnFieldLabelChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { if (newValue != null) { thisctrl.fieldLabel.Text = newValue.ToString(); } else { thisctrl.fieldLabel.Text = null; } } }
private static void OnFieldValueChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.fieldValue.Text = newValue?.ToString(); thisctrl.fieldValueDisplay.Text = newValue?.ToString(); if (newValue == null) { thisctrl.fieldValueDisplay.Text = thisctrl.PlaceHolder; thisctrl.fieldValueDisplay.TextColor = Color.Gray; } else { thisctrl.fieldValueDisplay.TextColor = Color.Default; } } thisctrl.SetIsRequired(newValue?.ToString()); }
private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue) { ESIEntry thisctrl = (ESIEntry)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.required.IsVisible = (bool)newValue; if ((bool)newValue) { if (string.IsNullOrEmpty(thisctrl.fieldValue.Text)) { thisctrl.required.Text = thisctrl.RequiredMessage; } else { thisctrl.required.Text = null; } } else { thisctrl.required.Text = null; } } }