We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
How to navigate page from viewmodel using button in ListViewItem?

SfListView allows you to navigate to another page when tapped on an element in the ListViewItem by adding the GestureRecognizers to that element in the ItemTemplate.

In the below code example, added the TapGestureRecognizer to the Image and bound the Command to navigate the page when tapped on that image from ViewModel.

XAML

 

In the ViewModel, navigate to another page through INavigation interface when the tap command is invoked.

C#

 

The below screenshots show the main page and the navigated page.


Click here to download the sample.

Article ID: Published Date: Last Revised Date: Platform: Control:
7520 02/28/2017 11/27/2017 Xamarin.Forms SfListView
Did you find this information helpful?
Comments
Austin Ford Oct 20, 2017

This Sample Project will not build.  Multiple errors regarding embedded resources.  Restoring and updating nuget packages does not correct any of the issues.

Reply
Muthu Kumaran Gnanavinayagam [Syncfusion] Oct 23, 2017

Hi Austin,

 

Sample project does not build due to long path name of the solution files. So we have modified the solution name and republished the documentation.

 

Regards,

G.Muthu Kumaran.

Reply
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.