I;m getting this error when I try to execute the code below, I'm trying to navigate to a new page and in that page I want the details that were on the previous page to display on the current page, however its giving me an error when I select anything on that page. Please kindly assist.
Code:
Application.Current.MainPage = new DistributorInfoPage(ProfileInfo.Name, ProfileInfo.Location, ProfileInfo.Image);
The full code:
public void Profile_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var ProfileInfo = e.CurrentSelection as Profile;
Application.Current.MainPage = new DistributorInfoPage(ProfileInfo.Name, ProfileInfo.Location, ProfileInfo.Image);
```