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

            if (thisctrl != null && oldValue != newValue)
            {
                if ((bool)newValue)
                {
                    if (thisctrl.picker.SelectedItem == null)
                    {
                        thisctrl.required.Text      = thisctrl.RequiredMessage;
                        thisctrl.required.IsVisible = true;
                    }
                    else
                    {
                        thisctrl.required.Text      = null;
                        thisctrl.required.IsVisible = true;
                    }
                }
                else
                {
                    thisctrl.required.Text      = null;
                    thisctrl.required.IsVisible = true;
                }
            }
        }
Exemple #2
0
        private static void OnPickerPlaceholderColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.PickerPlaceholderColor = (Color)newValue;
            }
        }
Exemple #3
0
        private static void OnPickerLabelColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.pickerLabel.TextColor = (Color)newValue;
            }
        }
Exemple #4
0
        private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.RequiredMessage = (string)newValue;
            }
        }
Exemple #5
0
        private static void OnDisplayMemberPathChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.picker.DisplayMemberPath = newValue?.ToString();
            }
        }
Exemple #6
0
        private static void OnSelectedIndexChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue && newValue != null)
            {
                thisctrl.picker.SelectedIndex = (int)newValue;
            }
        }
Exemple #7
0
        private static void OnPickerMarginChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.picker.Margin        = (Thickness)newValue;
                thisctrl.pickerDisplay.Margin = (Thickness)newValue;
            }
        }
Exemple #8
0
        private static void OnPickerLabelFontSizeChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                FontSizeConverter fsc = new FontSizeConverter();
                thisctrl.pickerLabel.FontSize = (double)fsc.ConvertFromInvariantString((string)newValue);
            }
        }
Exemple #9
0
        private static void OnPickerTitleChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                if (newValue != null)
                {
                    thisctrl.picker.Title = newValue != null ? (string)newValue : null;
                }
            }
        }
Exemple #10
0
        private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.picker.IsEnabled         = (bool)newValue;
                thisctrl.picker.IsVisible         = (bool)newValue;
                thisctrl.pickerDisplay.IsVisible  = !(bool)newValue;
                thisctrl.clearComponent.IsVisible = (bool)newValue;
            }
        }
Exemple #11
0
        private static void OnPickerLabelChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                if (newValue != null)
                {
                    thisctrl.pickerLabel.Text = newValue != null ? (string)newValue : string.Empty;
                }
            }
        }
Exemple #12
0
        private static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                if (newValue != null)
                {
                    thisctrl.picker.ItemsSource = (IEnumerable <object>)newValue;
                }
            }
        }
Exemple #13
0
        private static void OnSelectedItemChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIPicker thisctrl = (ESIPicker)bindable;

            thisctrl.SelectionChanged(oldValue, newValue);
        }