Secondary Order ToolbarItems not displayed correctly on iOS
See original GitHub issueDescription
On iOS, ToolbarItem
s that have their Order="Secondary"
are not displayed in the secondary level menu bar. Instead, they appear in line with the Primary
items.
I have the following XAML setup:
<ContentPage.ToolbarItems>
<ToolbarItem Command="{Binding SetLowBrightnessCommand}">
<ToolbarItem.IconImageSource>
<FontImageSource
FontFamily="MaterialIconsOutlined-Regular"
Glyph=""
Color="LightBlue"
Size="20"/>
</ToolbarItem.IconImageSource>
</ToolbarItem>
<ToolbarItem Command="{Binding SetHighBrightnessCommand}">
<ToolbarItem.IconImageSource>
<FontImageSource
FontFamily="MaterialIconsOutlined-Regular"
Glyph=""
Color="LightPink"
Size="32"/>
</ToolbarItem.IconImageSource>
</ToolbarItem>
<ToolbarItem
Order="Secondary"
Text="Item 3" />
<ToolbarItem
Order="Secondary"
Text="Item 4" />
</ContentPage.ToolbarItems>
On iOS the secondary items (Item 3, Item 4) are incorrectly displayed in the same level as the icons, which shouldn’t be the case:
On Android it works as expected:
Steps to Reproduce
- Create new MAUI project
- On MainPage, set
<ContentPage.ToolbarItems>
- Add some instances of
ToolbarItem
with default setting orOrder="Primary"
- Add one or more instances of
ToolbarItem
withOrder="Secondary"
- Observe the incorrect behavior on iOS
Link to public reproduction project repository
https://github.com/ewerspej/maui-samples/
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16 (and possibly earlier versions)
Did you find any workaround?
No
Relevant log output
n/a
Issue Analytics
- State:
- Created 5 months ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
ToolbarItems do not look right in iOS
1 Answer. On iOS, the Secondary items menu appears below the navigation bar as a horizontal list. if you want to acheve the...
Read more >Display toolbar items - .NET MAUI
Order, of type ToolbarItemOrder, determines whether the ToolbarItem object displays in the primary or secondary menu.
Read more >toolbar modifier positions button…
If the ToolbarItem wraps the button, they can be position in their expected positions and remain in place despite tapping either button. Now,...
Read more >Creating a Secondary (bottom) iOS Toolbar in Xamarin ...
I recently spent a couple of days trying to coax this feature into working properly before finally finding a solution (many other folks...
Read more >Working with Toolbar in SwiftUI
To show the system activity view in order to share the image. ... first one having a higher priority, so the second simply...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it should still be reproducible there. However, note that I’ve recently added Shane’s Workarounds NuGet package, which fixes a couple of things temporarily. The issue described here is not affected by that, though.
@thatkidyousaw1 No, I am not aware of a working workaround. However, I have also not invested much time into finding one, because this needs to work out-of-the-box. It’s clearly broken and I am categorically against workarounds for fundamental things. Workarounds for smaller bugs and issues are fine, but this is a showstopper for this feature and renders it utterly useless.