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; } } }
private static void OnPickerPlaceholderColorChanged(BindableObject bindable, object oldValue, object newValue) { ESIPicker thisctrl = (ESIPicker)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.PickerPlaceholderColor = (Color)newValue; } }
private static void OnPickerLabelColorChanged(BindableObject bindable, object oldValue, object newValue) { ESIPicker thisctrl = (ESIPicker)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.pickerLabel.TextColor = (Color)newValue; } }
private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue) { ESIPicker thisctrl = (ESIPicker)bindable; if (thisctrl != null && oldValue != newValue) { //thisctrl.RequiredMessage = (string)newValue; } }
private static void OnDisplayMemberPathChanged(BindableObject bindable, object oldValue, object newValue) { ESIPicker thisctrl = (ESIPicker)bindable; if (thisctrl != null && oldValue != newValue) { thisctrl.picker.DisplayMemberPath = newValue?.ToString(); } }
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; } }
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; } }
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); } }
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; } } }
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; } }
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; } } }
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; } } }
private static void OnSelectedItemChanged(BindableObject bindable, object oldValue, object newValue) { ESIPicker thisctrl = (ESIPicker)bindable; thisctrl.SelectionChanged(oldValue, newValue); }