-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows AppShell Title is overlaying on itself #22292
Comments
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! Open similar issues:
Closed similar issues:
|
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 |
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 |
It may happen, if there is Flyout. For this case workaround to hide it: AppShell.xaml <?xml version="1.0" encoding="UTF-8" ?>
<Shell
...
Navigated="shell_Navigated"
... AppShell.xaml.cs private void shell_Navigated(object sender, ShellNavigatedEventArgs e) {
if (GetPresentationMode(CurrentPage) == PresentationMode.Modal ||
GetPresentationMode(CurrentPage) == PresentationMode.ModalAnimated ||
GetPresentationMode(CurrentPage) == PresentationMode.ModalNotAnimated)
{
SetFlyoutBehavior(this, FlyoutBehavior.Disabled);
}
else
{
SetFlyoutBehavior(this, FlyoutBehavior.Flyout);
}
} You wont see overlapping if you have the same Title on pages. More difficult it is if you have multiple modals. |
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
The text was updated successfully, but these errors were encountered: