Tuesday, June 4, 2019

Picker on IOS kept updating list when DONE is not pressed.

on the .cs file where the pickers are you must include this.
using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
then use this on the picker you want to use. nameofpickerinxamlfile.On<iOS>().SetUpdateMode(UpdateMode.WhenFinished);

so now...the list will only get updated when the done button is pressed.
therefore the list are safe.


https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/ios/picker-selection

https://forums.xamarin.com/discussion/57793/picker-firing-event-selectedindexchanged-on-ios-too-early

https://stackoverflow.com/questions/56388534/xamarin-is-there-a-way-to-update-list-on-picker-when-user-changes-its-mind/56398643?noredirect=1#comment99454685_56398643

https://forums.xamarin.com/discussion/57793/picker-firing-event-selectedindexchanged-on-ios-too-early

https://blog.pieeatingninjas.be/2017/07/06/bind-to-xamarin-picker-but-only-update-value-after-hitting-done-on-ios/

No comments:

Post a Comment