I have a default overview.xaml loaded into a frame with a listview and I want to redirect to a details page of the item that I double clicked.
But how can I teach the details page which item has been double clicked?
void ListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
//send post info of selected item or similar missing...
this.Content = "Details.xaml";
}
Lösung:
this.NavigationService.Navigate(new Details(selectedItem)); //Details has a Constructor
You can use Page.NavigationService to call the Navigate overload that accepts a navigationState object. Or you can just create a constructor for the Details page which accepts the selected item as input and rewrite your code to this.Content = new Details(mySelectedItem);