示例#1
0
        private static void OnChoiceListChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.choiceList.ItemsSource = (ObservableCollection <ISearchItem>)newValue;
            }
        }
示例#2
0
        private static void OnTemplateChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SearchableList.ItemTemplate = (DataTemplate)newValue;
            }
        }
示例#3
0
        private static void OnChoiceColumnWidthChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.controlBackground.ColumnDefinitions[1].Width = (double)newValue;
            }
        }
示例#4
0
        private static void OnControlBkgColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.controlBackground.BackgroundColor = (Color)newValue;
            }
        }
示例#5
0
        private static void OnChoiceSourceBackgroundChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.choiceList.BackgroundColor = (Color)newValue;
            }
        }
示例#6
0
        private static void OnSelectedChoiceChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.choiceList.SelectedItem = (ISearchItem)newValue;
            }
        }
示例#7
0
        private static void OnSourceListChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIAlphaPicker thisctrl = (ESIAlphaPicker)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SearchableList.ItemsSource = (ObservableCollection <ISearchItem>)newValue;
                if (thisctrl.SelectedItem == null && thisctrl.ChoiceList != null)
                {
                    thisctrl.SelectedChoice = thisctrl.ChoiceList.First();
                }
            }
        }