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

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.RequiredMessage = (string)newValue;
            }
        }
Beispiel #2
0
        private static void OnReadOnlyTextColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.fieldValueDisplay.TextColor = (Color)newValue;
            }
        }
Beispiel #3
0
        private static void OnEditorBackgroundChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.fieldBorder.BackgroundColor = (Color)newValue;
            }
        }
Beispiel #4
0
        private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

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