How to get Icon for top tab in xamarin forms shell?

gothikgothik INMember ✭✭

I'm trying to develop a UI using Xamarin.Forms (Shell Navigation). I have bottom tabs and in each bottom tab there are several top tabs. I can able to show bottom tab Icons but the top tab icons are not shown (invisible). However, the text is visible.

I already tried to set Icon="image.png" for top tabs as I did for bottom tabs. Still the icons on top tabs are not visible.

Part of my XAML code:
<TabBar> <Tab Title="Browse" Icon="tab_feed.png"> <ShellContent ContentTemplate="{DataTemplate local:ItemsPage}" /> </Tab> <Tab Title="About" Icon="tab_about.png"> <ShellContent ContentTemplate="{DataTemplate local:AboutPage}" /> </Tab> <Tab Title="Test 2" Icon="tab_others.png"> <ShellContent Shell.NavBarIsVisible="False" Title="abt" Icon="tab_about.png" ContentTemplate="{DataTemplate local:AboutPage}" /> <ShellContent Title="fed" Icon="tab_feed.png" ContentTemplate="{DataTemplate local:ItemsPage}" /> </Tab> </TabBar>
The Icons defined in ShellContent are not visible (titles are visible though).

Please provide any direction or document to attain this.

Best Answer

Answers

Sign In or Register to comment.