iOS handler issues
Description
Secondary toolbar item dissapears when navigating away from page.
To Reproduce
- Create a detail page with secondary toolbar item.
- Create another page (lets call it page 2) with two secondary toolbar items.
- Run app.
- Detail page toolbar item appears correctly.
- Navigate to page 2, toolbar items appear as text.
- Close page 2, (should go back to detail page) now toolbar item dissapears on detail page.
Evidence
No response
App Version
1.0
OS Version
17.6.1
Diagnostic information
No response
Will look into it soon 👀
After some research, I came to a conclusion that rolling out a custom ToolbarItems property on the inherited ContentPage would be better.
- More options when setting item icon beyond just ImageSource (a good point to be made can be MauiIcons that pull icons from the font file)
- Item states (like checked/unchecked, disabled, etc)
- Nesting of menu items, section splitters, section titles:
iOS UIMenu Screenshot
A good inspiration for the nesting of items would be to take from WinUI's MenuFlyoutItem* API. In terms of Android, a fallback could be used to the builtin ContentPage.ToolbarItems using OnPlatform (unless there's a specific need for more options. I currently haven't worked on porting it to Android)
Let me know what you think @r-work
Sounds good if it's not a massive amount of work. Still hoping that MAUI team will be resolving the issue, though that might be a while. Thanks for all your work.
This has been implemented in MAUI 10. https://github.com/dotnet/maui/pull/28185