Hi all,
I have investigating how to apply a new Shell navigation expiriance to my application and I faced with issue
I cannot create in Flyout only with MenuItems and page switching using TabBar in one Shell
Is there a way to overcome it ?
Try this.
<FlyoutItem> <Tab> <ShellContent Title="Tab0" ContentTemplate="{DataTemplate pages:Page0}" /> </Tab> <Tab> <ShellContent Title="Tab1" ContentTemplate="{DataTemplate pages:Page1}" /> </Tab> </FlyoutItem> <MenuItem Text="Help" Command="{Binding HelpCommand}" CommandParameter="https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell" />
Answers
It seems to be hardly to do that.
MenuItems
is an option feature inFlyout
. When usingFlyout
, 'TabBar' will not work.Besides,
Flyout
contains tab and it's enough to achieve the navigation.Seems like I have not been precise, I want Flyout for MenuItem and TabBar for navigation, I do not like when Tab from FlyoutItem is duplicated in Tab
Is there way to have FlyoutItem to be shown in main navigation, but not shown in Flyout ?
I tested the code and search related document, but not found a way to do that. Set 'FlyoutDisplayOptions' of
FlyoutItem
to 'AsSingleItem' or as default. The item_selections in FlayoutItem and Tab are not duplicated.May I know if Shell FlyoutItem and TabBar are exclusive to each other ?
@RedRa
Update the Xamarin.Forms to the newest version 4.2.709249 and you'll achieve the feature.
Okay, I have searched for updates Shell in Xamarin.Forms 4.2.709249 and have not found any mentions regarding TabBar with FlyoutItems ?!
Although there is currently no clear documentation for this, you can implement the feature in code.
Unfortunatly it does not work
I have tried to do the follwoing:
And MenuItem is not shown ...
Try this.
Unfortunately it does not work. My version is 4.8.0.15. When tried, bottom tabbar objects are replaced with Flyout objects.
The following pic has a set of objects in bottom Tabbar using around all pages in application.
The following pic has a set of objects in Flyout considering as side menu for the application.
****Note:**** Both Tabbar and Flyout are having different objects.
Now, when I click on an object in Flyout, objects in bottom Tabbar are replaced with Flyout objects. Please see the below pic,
I couldn't find the reason.