public App() { InitializeComponent(); // Change this to false to see that ShowSizePage works properly if not loaded through MenuPage bool showMenu = true; if (showMenu) { MainPage = new MenuPage(); // Throws exception } else { MainPage = new ShowSizePage(); // Works } }
void OnShowSizeClicked(object sender, EventArgs args) { ContentPage c = new ShowSizePage(); Content = c.Content; // Exception is caused here }