Setting Mainpage to Shell

mangunmangun Member ✭✭

I'm setting the main page of the application to the Shell using the following code;

Device.BeginInvokeOnMainThread(() =>
{
_shell = new AppShell();
Application.Current.MainPage = _shell;
});

this makes part of the screen black before navigating to the Shell. What could be the issue?

Tagged:

Best Answers

  • mangunmangun ✭✭
    Accepted Answer

    This only seem to happen in the debug mode but not when the debugger is attached, so believe we can ignore this issue.

Answers

  • mangunmangun Member ✭✭

    No this won't happen if set in the App's construct but if the MainPage is changed at a later point. I'll share a sample soon.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Hi @mangun, did you have any update?

  • mangunmangun Member ✭✭
    Accepted Answer

    This only seem to happen in the debug mode but not when the debugger is attached, so believe we can ignore this issue.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Do you mean your issue has been resolved? If so, try to accept the helpful answer to close this discussion.

Sign In or Register to comment.