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); } }