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

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.ReadOnlyTextColor = (Color)newValue;
            }
        }
Beispiel #2
0
        private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEntry thisctrl = (ESIEntry)bindable;

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

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.ReadOnlyPlaceholder = (string)newValue;
            }
        }
Beispiel #4
0
        private static void OnAsPasswordChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEntry thisctrl = (ESIEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.fieldValue.IsPassword = (bool)newValue;
            }
        }
Beispiel #5
0
        private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEntry thisctrl = (ESIEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SetVisibility((bool)newValue);
            }
        }
Beispiel #6
0
        private static void OnBkgColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEntry thisctrl = (ESIEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.fieldPanel.BackgroundColor = (Color)newValue;
            }
        }
Beispiel #7
0
        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;
            }
        }
Beispiel #8
0
        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;
                }
            }
        }
Beispiel #9
0
        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;
                    }
                }
            }
        }
Beispiel #10
0
        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;
                }
            }
        }
Beispiel #11
0
        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());
        }
Beispiel #12
0
        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;
                }
            }
        }