How can I draw a top line for the selected tab item ?
I'm using the standard xamarin Forms pagged layout shell and this is in context of the footer tabbed navigation. I'm building with xamarin for both ios,android.
How can I draw a top line for the selected tab item ?
I'm using the standard xamarin Forms pagged layout shell and this is in context of the footer tabbed navigation. I'm building with xamarin for both ios,android.
Depends on what is your current context but an alternative could be to to use TabView from Xamarin community toolkit package, where this capability is already built-in and a lot more.
properties relevant to this question are TabIndicatorPlacement
, TabIndicatorColor
. and TabStripPlacement
<xct:TabView
TabStripPlacement="Bottom"
TabStripBackgroundColor="Blue"
TabStripHeight="60"
TabIndicatorPlacement="Top"
TabIndicatorColor="Yellow"
TabContentBackgroundColor="Yellow">
<xct:TabViewItem
Icon="triangle.png"
Text="Tab 1"
TextColor="White"
TextColorSelected="Yellow"
FontSize="12">
<Grid
BackgroundColor="Gray">
<Label
HorizontalOptions="Center"
VerticalOptions="Center"
Text="TabContent1" />
</Grid>
</xct:TabViewItem>
<xct:TabViewItem
<xct:TabViewItem
Icon="circle.png"
Text="Tab 2"
TextColor="White"
TextColorSelected="Yellow"
FontSize="12">
<Grid>
<Label
HorizontalOptions="Center"
VerticalOptions="Center"
Text="TabContent2" />
</Grid>
</xct:TabViewItem>
</xct:TabView>
Edit
Shell
is not defining a strip indicator for bottom tabs (for top tabs yes), so you are more probably needs to do it with a custom renderer (for each platform) or even build it yourself natively (on each platform).