2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
In SfListView, Event can be turned into the Command using Behaviors to follow the MVVM pattern. To achieve this, need to create a Command for the ItemTapped event of SfListView in ViewModel. C#
And associate that Command to the appropriate Event of SfListView using Behaviors like below.
XAML
Now, when tapped on the ListViewItem, corresponding Command in ViewModel will be invoked automatically and performed the desired operation as shown in below screenshot. Screenshot: Click here to download the sample. |
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.
To make this a tad more helpful, one should reference the "local:EventToCommandBehavior" which is outlined on this page. https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/behaviors/reusable/event-to-command-behavior/
To Be Honest - you should make a Command Property like other vendors. Make your controls robust as possible to make the developer's lives easier.
Hi Dave,
Thanks for your valuable feedback. We are already have plan to provide Command for the applicable events. This feature is in queue and will implement in any our upcoming release.
Regards,
G.Muthu Kumaran.
Any progress?
Hi Steve,
We have provided Tap Command and Hold Command which is available from our Syncfusion version 16.1.0.24. You can refer the following user guide documentation which provides details about Tap and Hold command.
https://help.syncfusion.com/xamarin/sflistview/mvvm#commands
Regards,
Jayaleshwari N