I am using XF 4.0 with the Shell features. This is more of a question, i would like to know if Shell can add ToolBarItems similar to MainPage
Add below code in AppShell.xaml
<Shell.ToolbarItems>
<ToolbarItem Clicked="Account_Clicked"
IconImageSource="ic_account.png"
Order="Primary"
Priority="0"
Text="Account" />
<ToolbarItem Clicked="Settings_Clicked"
Order="Primary"
Priority="1"
Text="Settings">
<ToolbarItem.IconImageSource>
<OnPlatform x:TypeArguments="ImageSource">
<On Platform="iOS" />
<On Platform="Android">ic_setting.png</On>
</OnPlatform>
</ToolbarItem.IconImageSource>
</ToolbarItem>
</Shell.ToolbarItems>
ToolbarItems should be displayed.
No ToolBarItems is shown
@PureWeen Any thoughts?
@AnthonyLatty Yea! I feel like this is a good idea. Being able to just specify some persistent Menu items would be really useful. Like putting the about or other icons up there
@PureWeen exactly...this functionality was vital in XF 3.6.xx. Now in XF 4.0 its missing. There are cases where you want to display toolbar items across pages. In XF 3.6.x.x, defining toolbar items in MainPage achieves this.
@AnthonyLatty I didn't realize that this worked in 3.6
So you're saying it broke in 4.0? Alright I'll prioritize this a bit higher than
@PureWeen Yeah it definitely is broken for 4.0. The only difference in the code above is for traditional XF apps with MainPage it would be MainPage.ToolBarItems
.
With shell automatically i thought it would be Shell.ToolBarItems
but thats not the case. I will have to adjust my designs etc.
How can we add the Toolbar Items On Shell template in Xamarin. Forms
How can we add the Toolbar Items On Shell template in Xamarin. Forms
Today I don't have solutions for that question, anyone already has?
What is the status on this @samhouts ?
This is on the backlog. I don't currently have an estimate of when we may begin work on this item. Thank you for your patience!
The same issue come with me. We are try to add toolbar items on "Tabbed Pages" in shell but it not work . please make sure it work with "Content Page" as well as with "Tabbed Page"
Same issue #7351
Thanks
!hope done in 5.0.1 release
Most helpful comment
@AnthonyLatty Yea! I feel like this is a good idea. Being able to just specify some persistent Menu items would be really useful. Like putting the about or other icons up there