maui
maui copied to clipboard
Shell TitleView not reliable
Description
If you add content to a Shell.TitleView it sometimes (50%) doesn't display.
E.g.
<Shell.TitleView>
<Image Source="edit.png" Aspect="AspectFit" HorizontalOptions="Start" VerticalOptions="Center" />
</Shell.TitleView>
As you navigate around, it will sometimes display ok and other times it won't show. It is random - even on the same page it will sometimes show or not show.
On iOS it is even worst - it just doesn't show at all.
Here it is working on page 1:
Here it is not working on page 2:
Back on page 2 and now it shows:
Steps to Reproduce
Open app from repo below. Notice icon appears on top of page Switch to other tabs and notice it disappears occsaionally. Notice that switching back to tabs which didn't show the icon sometimes show it, and vice versa. In this app it seems to be every alternate click it switches, so to see the problem on page 2, follow this sequence:
- Page 2 - not showing
- Page 3 - showing
- Tab 2 - Not showing
- Page 2 - showing
Link to public reproduction project repository
https://github.com/williambuchanan2/MauiShell
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android 11 - 13, iOS 16
Did you find any workaround?
No
Relevant log output
No response
I'm facing a similar issue. If I navigate back and forth, some elements disappear from the Shell TitleView.
Hi, I described the bug also here: [https://github.com/dotnet/maui/issues/13916]. I've been waitig for 2 months now with my updated app to .Net MAUI, but with this bug it is not possible. :-(
Unfortunately there are a lot of more critical issues which have been reported over 2 years ago that haven't been addressed, so my only advice is look for a workaround because not much is getting fixed in Maui.
On iOS there's also a delay when using shell in showing the title. The animation first loads all the content and then updates the title of the page with a delay of approximately 500ms
@williambuchanan2 The reproduction project doesn't build for me. Do you have a simpler sample? Thanks!
Hi @williambuchanan2. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
I have updated the project. Can you pull the changes down and see if it builds now? The project is already a simple sample - there isn't much code in there. If you have problems building again can you let me know what error you are getting? Thanks
Im also experiencing this issue - on both iOS and android..there is definitely issues around shell.title view when you have shell tabs (in my case I have bottom and top tabs)
Facing the same issue. We need a fix
Verified this issue with Visual Studio Enterprise 17.9.0 Preview 4. Can repro on android and iOS platforms with sample project. https://github.com/williambuchanan2/MauiShell
It's 2024 and it's still hard to understand these strange mistakes of the maui platform. The imagebuttons I put in Shell.TitleView on the Android platform work correctly, but not on iOS. When I change the theme of the app from dark to light, the buttons appear. It is very strange.
@omer-ays - are you changing the icon color based on theme? (Are you sure you don't have a dark icon on a dark background or vica versa.) I have icons working in my app for light and dark themes.
@omer-ays - are you changing the icon color based on theme? (Are you sure you don't have a dark icon on a dark background or vica versa.) I have icons working in my app for light and dark themes.
interestingly it started working smoothly. Strange.