private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.RequiredMessage = (string)newValue; } }
private static void OnReadOnlyTextColorChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.fieldValueDisplay.TextColor = (Color)newValue; } }
private static void OnEditorBackgroundChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.fieldBorder.BackgroundColor = (Color)newValue; } }
private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.SetRequiredFlag(); } }
private static void OnPlaceHolderChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { if (newValue != null) { thisctrl.fieldValue.Placeholder = (string)newValue; } } }
private static void OnFieldLabelChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { if (newValue != null) { thisctrl.fieldLabel.Text = newValue.ToString(); } else { thisctrl.fieldLabel.Text = null; } } }
private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.fieldBorder.IsVisible = !(bool)newValue; //thisctrl.fieldValueDisplay.IsVisible = (bool)newValue; thisctrl.SetVisibility((bool)newValue); if (!string.IsNullOrEmpty(thisctrl.fieldValueDisplay.Text)) { thisctrl.fieldValueDisplay.TextColor = thisctrl.ReadOnlyTextColor; } else { thisctrl.fieldValueDisplay.TextColor = Color.Gray; } } }
private static void OnFieldValueChanged(BindableObject bindable, object oldValue, object newValue) { ESIEditor thisctrl = (ESIEditor)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.SetRequiredFlag(); thisctrl.SetVisibility(thisctrl.CanEdit); } }