Open LeoJHarris opened 3 years ago
I also have noticed this bug many times, but I cannot say why...
Actually, anytime I sign out / sign in again to my app, then I'm able to the the TabIndicatorColor once landing on page !
I guess it could be something related to events ordering, BindingContext initializations... I'll comment more in case I get it.
Hi @LeoJHarris ,
Did you try just setting "SelectedIndex" property with a default value ?
SelectedIndex="0"
@Kapusch yes same issue occurs
@Kapusch If this is only occurring on iOS and not on android then how could events ordering, BindingContext initializations be factors are these handled differently on iOS?
I am also having this issue on my app.
I have noticed that this this bug is only happening when the TabView page is opened using Application.Current.MainPage.Navigation.PushAsync
When setting the page directly as Application.Current.MainPage the TabIndicatorColor is showing correctly.
Hi @LeoJHarris , I'm facing this issue once again, and I may have found a workaround. Could you try to set the SelectedIndex in the view "OnAppearing" event ? (not working if set in the view constructor)
Of course, this supposes to work on ContentPage views, I'm still trying to find a way to make it work for my ContentView views.
@Kapusch there is a better work around to set the TabIndicatorView yourself in XAML as shown below.
<xct:TabView>
<xct:TabView.TabIndicatorView>
<BoxView
WidthRequest="{Binding Source={x:Reference tabItemBase}, Path=Width}" />
</xct:TabView.TabIndicatorView>
<xct:TabViewItem
x:Name="tabItemBase"
Appears like a bug that when landing on a page with the TabView that the TabIndicatorColor is not showing initially, when I select another tab then the color changes. The color of the TabIndicatorColor is referenced as a DynamicResource in XAML.
Expected Behavior
Color of the TabIndicatorColor should show when page appeared
Actual Behavior
The TabIndicatorColor does not show when page appear and only shows when selecting a new tab then the TabIndicatorColor indicated the correct color for the selected tab
Basic Information
Workaround
NONE
Reproduction imagery
When page is first appeared the TabIndicatorColor is not shown:
When selecting the next tab it then shows:
Reproduction Link