maui: Shell ToolbarItems not shown in iOS App
Description
A ToolbarItem added in the AppShell.xaml is not shown under iOS:
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="Test_Project_Template.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Test_Project_Template"
Shell.FlyoutBehavior="Disabled">
<!-- This ToolbarItem is not shown-->
<Shell.ToolbarItems>
<ToolbarItem Text="Test"></ToolbarItem>
</Shell.ToolbarItems>
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
</Shell>
Steps to Reproduce
- Create a new MAUI Project in Visual Studio
- Add a ToolbarItem in the Shell
- Build the app and deploy it to the end device
- Android: The ToolbarItem is shown on the right side of the Toolbar
- iOS: The ToolBarItem is not shown in the Toolbar
Link to public reproduction project repository
https://github.com/573F4N077/Shell.TitleBarItems
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16
Did you find any workaround?
It might be possible to create a TitleView with custom buttons. But here I found other problems (like binding the title…)
Instead of having global ToolbarItems defined in the Shell it is be possible to add a ToolbarItem in every single Page.
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 12
- Comments: 19 (5 by maintainers)
@asi-evin Thank you for letting me know! I’ve reopened this one.