Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
                }
            }
        }
Esempio n. 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;
                    }
                }
            }
        }
Esempio n. 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;
                }
            }
        }
Esempio n. 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());
        }
Esempio n. 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;
                }
            }
        }