Example #1
0
        private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SetRequiredFlag();
            }
        }
Example #2
0
        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);
            }
        }