-
Notifications
You must be signed in to change notification settings - Fork 1.7k
-
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
Title view not displayed after navigating shell tabs #9269
Comments
After testing on Android, I found that the TitleView is not displayed on the second tab but is still present when navigating back to the first tab. |
I can confirm this happens on Android, too. This is a really critical issue, as long as there is no workaround. |
I have found a workaround. By wrapping the shell in a navigation page, the title view is no longer affected by shell tab navigation. A few things I will mention, this will place the TitleView above the Flyout menu if flyout items are used and the Shell is no longer accessible using Shell.Current. In order to access the shell, I set the shell to a static property in App.xaml.cs, so I can still navigate using routes by calling App.Shell.GoToAsync("//..."). Hopefully this will be resolved soon. The title bar above the menu items is not ideal in my case and I'd rather not have the Shell accessible as a static property in my App class. I have added an example to the repro project but the steps are listed below.
public App()
{
InitializeComponent();
Shell = new AppShell();
MainPage = new NavigationPage(Shell);
}
<Shell
x:Class="ShellNavPageTitleView.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ShellNavPageTitleView"
NavigationPage.TitleView="{StaticResource TitleView}">
...
</Shell> |
@tdeborde2, I like your workaround except for the following: it doesn't have a back button when you navigate into a sub shell like /page1/page1details I am sure i can implement something like this manually, but an official fix from Microsoft would be better appreciated sooner than later. |
You can try the solution posted here. I hope it helps 🙂👍🏻 |
Is there a fix for this yet?? |
Our friend @PureWeen did a PR with a fix for this. Hopefully, this will be fixed on the next MAUI release which is expected soon... 👍🏻 In the meantime, you can use the workaround posted here #9687 (comment) I hope it helps you :) |
hopefully the next next release :-) |
Is there a fix for this yet? Also when there is will the fix also be available in Xamarin.forms?? Many thanks |
Description
While adding a title view to a new .NET MAUI shell application with a bottom tab bar, I noticed that the title view is removed after returning to first tab. This has only been verified on iOS and macOS.
Repository containing sample project
Steps to Reproduce
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, macOS
Affected platform versions
iOS 15, macOS 12.3.1
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: