I\'m trying to navigate between pages and bind data at same time.
This is what I have tried :
public ICommand GetIdeasCommand
{
get
{
Your understanding of BindingContext is lacking. Usually you bind a ViewModel to a BindingContext. What you're doing here
this.BindingContext = new IdeasSinglePage(ideas); //the app breaks here
doesn't make sense.
You are passing as context the page you want to load ? Just delete this line completely. Since in your recent comments you said you didn't want a ViewModel to begin with, what you will do in your CodeBehind is:
public partial class IdeasSinglePage : ContentPage
{
public IdeasSinglePage(List ideas)
{
InitializeComponent();
listViewName.ItemsSource = ideas;
}
}
And in your xml you give your listView a Name. You need this Name for referencing the list on code behind.
Hope it helps