Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How can I access Navigation from within a ViewCell?

$
0
0

Let's say that I have a custom ViewCell for a ListView, where each cell contains a button. When a user clicks that button I'd like to be able to push a new page onto the navigation stack. The problem is that because I'm not inside the ContentPage, but in a ViewCell, I don't have access to the Navigation property.

The cells themselves are also managed automatically through the ListView, so as far as I know I don't have a way to pass the parent ContentPage through the constructor, right?

Is there a way to access the Navigation features from the ViewCell? Or do I need to somehow restructure my ListView to pass the ContentPage through to each ViewCell?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>