Esempio n. 1
0
        internal static void SetSelectedItem(this MauiPicker nativePicker, IPicker picker)
        {
            if (nativePicker == null)
            {
                return;
            }

            int index = picker.SelectedIndex;

            if (index == -1)
            {
                picker.SelectedItem = null;
                return;
            }

            if (picker.ItemsSource != null)
            {
                picker.SelectedItem = picker.ItemsSource[index];
                return;
            }

            picker.SelectedItem = picker.Items[index];
        }
Esempio n. 2
0
 public static void UpdateTitle(this MauiPicker nativePicker, IPicker picker) =>
 nativePicker.UpdatePicker(picker);
Esempio n. 3
0
 public static void UpdateSelectedIndex(this MauiPicker nativePicker, IPicker picker) =>
 nativePicker.SetSelectedIndex(picker, picker.SelectedIndex);
Esempio n. 4
0
 public static void UpdateSelectedIndex(this MauiPicker nativePicker, IPicker picker) =>
 UpdatePicker(nativePicker, picker);
 internal static void UpdateAttributedPlaceholder(this MauiPicker nativePicker, NSAttributedString nsAttributedString)
 {
     nativePicker.AttributedPlaceholder = nsAttributedString;
 }
 public static void UpdateTitleColor(this MauiPicker nativePicker, IPicker picker) =>
 nativePicker.SetTitleColor(picker);