Beispiel #1
0
        internal static void UpdatePicker(this MauiPicker platformPicker, IPicker picker)
        {
            var selectedIndex = picker.SelectedIndex;

            platformPicker.Text = selectedIndex == -1 ? "" : picker.GetItem(selectedIndex);

            var pickerView = platformPicker.UIPickerView;

            pickerView?.ReloadAllComponents();

            if (picker.GetCount() == 0)
            {
                return;
            }

            platformPicker.SetSelectedIndex(picker, selectedIndex);
        }
Beispiel #2
0
 public static void UpdateSelectedIndex(this MauiPicker platformPicker, IPicker picker) =>
 platformPicker.SetSelectedIndex(picker, picker.SelectedIndex);
Beispiel #3
0
 public static void UpdateSelectedIndex(this MauiPicker nativePicker, IPicker picker) =>
 nativePicker.SetSelectedIndex(picker, picker.SelectedIndex);