[Android] Empty screen when creating a new MainPage instead of navigating to it in App.xaml.cs. #17277
-
It works on Windows and Desktop, but fails on Android. Original code: if (RootFrame!.Content == null)
{
RootFrame.Navigate(typeof(MainPage), args.Arguments);
} Modified: if (RootFrame!.Content == null)
{
RootFrame.Content = new MainPage();
} |
Beta Was this translation helpful? Give feedback.
Answered by
jeromelaban
Jun 25, 2024
Replies: 1 comment
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mcNets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Frame
control does not support changing its content this way on android, specifically. If you want to change the root, set the MainPage directly to theWindow.Content
instead.