You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .NET MAUI team is deprecating the usage of Application.MainPage because it, normally, isn't what devs/we expect to be. In a MultiWindow scenario it can return the wrong Page.
One way to workaround this is to change Application.Current.MainPage to Application.Current.Windows[0].Page.
At least for me, isn't 100% clear what Windows[0] means:
it's the first window at collection
it's the topmost window
it's the focused window
For join the discussion at .NET MAUI repo, please go here.
Maybe, today we already have a bug for multi-window apps, but since no user has reported any issue we don't need to rush on this.
The text was updated successfully, but these errors were encountered:
The .NET MAUI team is deprecating the usage of
Application.MainPage
because it, normally, isn't what devs/we expect to be. In a MultiWindow scenario it can return the wrong Page.One way to workaround this is to change
Application.Current.MainPage
toApplication.Current.Windows[0].Page
.At least for me, isn't 100% clear what
Windows[0]
means:For join the discussion at .NET MAUI repo, please go here.
Maybe, today we already have a bug for multi-window apps, but since no user has reported any issue we don't need to rush on this.
The text was updated successfully, but these errors were encountered: