Picker not fully cooperating with MVVM

I'm trying to work with Syncfusion's Picker but it's not fully cooperating with MVVM. The Picker successfully loads the Categories into the ItemsSource and calls the SelectionChangedCommand from the ViewModel, but the SelectedItem binding to SelectedCategory does not update. Any solutions? Thanks!


picker.png
 



1 Reply 1 reply marked as answer

VO Vishal Omprasad Syncfusion Team March 7, 2025 07:09 AM UTC

Hi Conor,

Based on the provided details and code snippet, we have tested the reported scenario regarding "Binding SelectedItem to a ViewModel property is not working".

Upon analyzing the code, we found that the BindingMode for SelectedItem is not explicitly set to TwoWay. TwoWay Binding ensures that the selected item remains synchronized between the Picker and the ViewModel, allowing changes in either to be reflected in both, whether during initial loading or when dynamically changing the ViewModel property.

We have attached the tested sample for SelectedItem binding in MAUI across platforms. Please review the sample and let us know if the issue persists.

Regards,
Vishal O.


Attachment: Picker_342825f.zip

Marked as answer
Loader.
Up arrow icon