binding for SfSegmentedControl SelectionChanged

 hi all,
how can i use  binding for SfSegmentedControl SelectionChanged in order to use with my viewModel?
thanks

3 Replies

PA Paul Anderson S Syncfusion Team October 16, 2018 04:56 AM UTC

Hi Alberto, 
 
Thanks for contacting Syncfusion support. 
 
Your requirement can be achieved by using “Behaviors in Xamarin Forms” and we have prepared a sample to achieve your requirement. Please find the sample from the below link. 
 
 
Please check our sample and let us know if you have any concerns. 
 
Regards, 
Paul Anderson 



SP Stjepan Puljko November 8, 2018 11:26 AM UTC

I think it is easier just to bind Index property and handle changes in view model...
Index = "{Binding SelectedFragmetIndex, Mode=TwoWay}"


PA Paul Anderson S Syncfusion Team November 8, 2018 11:30 AM UTC

Hi Sthepan, 
  
Greetings from Syncfusion.  
  
Yes. We can bind the SelectedIndex API to the ViewModel as like your solution. We provided Behavior concept for using the SelectionChanged event in MVVM model. 
  
Regards, 
Paul Anderson 


Loader.
Up arrow icon