- Home
- Forum
- Xamarin.Forms
- SfChipGroup with Enums and MVVM - selected item binding
SfChipGroup with Enums and MVVM - selected item binding
Hello,
I am having trouble binding a SelectedItem to SfChipGroup from my ViewModel (TwoWay binding mode).
This SfChipGroup has a collection of Enum values as an ItemsSource and its SelectedItem is an enum value from this collection. Both of these are binded from the ViewModel. The individual chips and their labels are binded and displayed correctly; however, the selected item binded from ViewModel is not highlighted (SelectedChipBackgroundColor, SelectedChipTextColor). The highlighting only works when I manually tap on a Chip in my running application. Therefore, I feel like the binding works only in a direction from the View to my ViewModel.
Is there a way to resolve this issue and to fix the initial binding of SelectedItem from my ViewModel?
Thanks
Currently we are analyzing on the reported query at our end, and we will update you the details on or before November 19, 2021.
Regards,
Please find the patch from the below link:
|
Please clear the NuGet cache, before using the latest one.
|
Hi All,
I'm also interested in an example of how this is achieved. Is it possible to show me some code or a working example for this case.
Regards
Kris
- 8 Replies
- 4 Participants
- Marked answer
-
OS Ondrej Slimak
- Nov 16, 2021 11:07 AM UTC
- Feb 24, 2022 02:57 PM UTC