Open Eronan opened 1 week ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Hmmm... I'm having difficulty reproducing this issue. Could you provide me a stand-alone sample with the problem?
Here's what I've tried to test with:
MainPage.cs:
public MainPage()
{
InitializeComponent();
this.Loaded += MainPage_Loaded;
}
private void MainPage_Loaded(object? sender, EventArgs e)
{
this.Window.Title = "Main Page";
}
private async void Button_Clicked(object sender, EventArgs e)
{
if (Navigation.NavigationStack.Count > 1)
{
await Navigation.PushModalAsync(new MainPage());
}
else
{
await Navigation.PushAsync(new MainPage());
}
}
I've tried using both NavigationPage
and Shell
as the Window
root page.
https://github.com/Eronan/NavigationOverlayIssue
Created a separate repository, project, and solution file.
The workaround used in this Bug will also remove the duplicate heading at the top of the AppShell.
For a workaround, just remove the default Page
style in Styles.xaml
. That seems to be the source of the problem.
Description
When the NavigationStack has 2 or more items, and the ModalStack has 1 item. The AppShell will create another copy of its Window Title and attempt to overlay itself over itself causing the Title to be unreadable.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/Eronan/NavigationOverlayIssue
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
net8.0-windows10.0.19041.0
Did you find any workaround?
Using
INavigation.PushModalAsync(new NavigationPage(new ModalPage()));
instead of using shell navigationRelevant log output
No response