Syncfusion SfRating ValueChanged Event To Command

I have a Syncfusion SfRating control on my xamarin forms view. I want to handle ValueChanged event in Prism ViewModel.

    View Model C# :

RatingValueChanged = new BitDelegateCommand(async () =>
            {
                await _pageDialogService.DisplayAlertAsync("", "RatingValueChanged", ErrorMessages.Ok);
            });


But an Exception accurs : System.ArgumentException: Expression of type 'Syncfusion.SfRating.XForms.ValueEventArgs' cannot be used for parameter of type 'System.EventArgs' of method 'Void Invoke(System.Object, System.EventArgs)' Parameter name: arg1

What's wrong? How can I send ValueChangedEventArgs e parameter of event to command?


4 Replies

PA Paul Anderson S Syncfusion Team August 1, 2018 12:26 PM UTC

Hi MK, 
  
Greetings from Syncfusion. 
  
We are able to reporduce the reported issue with SfRating control and it is due to ValueChangedEventArgs not inherited from System.EventArgs class. This will be fixed and will be available in our Volume 2 SP2 release which will be rolled out by the end of August 2018. 
  
Regards, 
Paul Anderson 



AM Amen October 6, 2018 09:43 PM UTC

Do you think that the same would apply to OnMonthCellLoaded event? The event args is of type MonthCell and it should inherit from System.EventArgs instead?


VR Vigneshkumar Ramasamy Syncfusion Team October 8, 2018 12:51 PM UTC

Hi Amen, 
 
Please follow up the incident which you have created for the same query. 
 
 
Regards 
Vigneshkumar R 



VR Vigneshkumar Ramasamy Syncfusion Team October 8, 2018 01:03 PM UTC

Hi Amen 
 
Please ignore the previous update. Follow up the below forum regarding the reported query. 
 
 
Regards 
Vigneshkumar R 


Loader.
Up arrow icon