Hello,
Welcome to Microsoft Q&A.
I checked your code, in MasterDetailView, you bound the data source: ItemsSource="{x:Bind Emails}", but in MainPage.xaml.cs, you did not define the corresponding property, this is an error the reason.
{x:Bind} will bind the properties in the current DataContext of the page, so if you want to reuse the data collection Emails, please do not use Converter to switch pages, but create an application-level ViewModel, which exists as a singleton, and then reference in the page.
We can try to do:
AppViewModel.cs
public class AppViewModel
{
public ObservableCollection<Email> Emails = new ObservableCollection<Email>();
public AppViewModel()
{
var emails = MyEmailManager.GetEmails();
emails.ForEach(email => Emails.Add(email));
}
}
App.xaml.cs
public static AppViewModel VM = new AppViewModel();
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
// Other code
}
MainPage.xaml.cs
public ObservableCollection<Email> Emails = App.VM.Emails;
public MainPage()
{
this.InitializeComponent();
}
In this way, you can refer to the Emails located in the AppViewModel instance on different pages without creating a new collection.
Thanks.