Пример #1
0
        private static void OnFormatPhoneNumberChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.FormatPhoneNumber = (Func<string,string>)newValue;
            }
        }
Пример #2
0
        private static void OnPhoneTitleChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.phoneTitle.Text = (string)newValue;
            }
        }
Пример #3
0
        private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SetVisibility((bool)newValue);
            }
        }
Пример #4
0
        private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.RequiredMessage = (string)newValue;
            }
        }
Пример #5
0
        private static void OnReadOnlyPlaceHolderColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.ReadOnlyPlaceHolderColor = (Color)newValue;
            }
        }
Пример #6
0
        private static void OnSelectedPhoneChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.phone.Text = newValue.ToString();
                thisctrl.PhoneNumberChanged(newValue.ToString());
            }
        }
Пример #7
0
        private static void OnSelectedPhoneMarginChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.phone.Margin         = (Thickness)newValue;
                thisctrl.readOnlyPhone.Margin = (Thickness)newValue;
            }
        }
Пример #8
0
        private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPhoneEntry thisctrl = (ESIPhoneEntry)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.required.IsVisible = (bool)newValue;
                if ((bool)newValue)
                {
                    if (string.IsNullOrEmpty(thisctrl.phone.Text))
                    {
                        thisctrl.required.Text = thisctrl.RequiredMessage;
                    }
                    else
                    {
                        thisctrl.required.Text = null;
                    }
                }
                else
                {
                    thisctrl.required.Text = null;
                }
            }
        }