Navigation Explanation

May 13, 2013 at 12:25 AM
Edited May 13, 2013 at 11:16 AM
Could you explain how to navigate to a specific page when a user clicks an item in a GridView? I reviewed the demo for ListViewItemClicked behavior, but not making sense.

I was successful in adding this to my own project, but any explanation of how it works will be appreciated.

May 14, 2013 at 8:55 PM

Based on my understanding, the ListViewItemClickedToAction class defines an attached property that can be attached to a XAML control which can hold an Action<object> (e. i. a method that receives an object and returns nothing).

When attached to a ListViewBase, the ListViewItemClickedToAction subscribes to its ItemClick event. When a user clicks in the ListView, the ListViewItemClickedToAction is then notified of the interaction and executes the Action<object> that was set in the property (for example, the ProductNavigationAction) passing the ClickedItem as a parameter. In said action you can perform a navigation request using the NavigationService.

Regarding how the navigation process works, I believe you can find information about it in the draft documentation of the project:
I hope this helps,

Damian Cherubini