Ejemplo n.º 1
0
        void UpdatePickerFromPickerSource(PickerSource?pickerSource)
        {
            if (VirtualView == null || PlatformView == null || pickerSource == null)
            {
                return;
            }

            PlatformView.Text         = VirtualView.GetItem(pickerSource.SelectedIndex);
            VirtualView.SelectedIndex = pickerSource.SelectedIndex;
        }
Ejemplo n.º 2
0
        void OnEnded(object?sender, EventArgs eventArgs)
        {
            if (_pickerView == null)
            {
                return;
            }

            PickerSource?model = (PickerSource)_pickerView.Model;

            if (model.SelectedIndex != -1 && model.SelectedIndex != _pickerView.SelectedRowInComponent(0))
            {
                _pickerView.Select(model.SelectedIndex, 0, false);
            }
        }