[MAUI] First Tab ist not showing
See original GitHub issuePlatform (please complete the following information):
- OS: Android
- Device: [AndroidEmulator & Amazon Fire Tablet]
- Sdk vervion: [Android SDK 29+]
- MAUI: [6.0.552]
Describe the bug I am using DelayedViews in my TabSwitcher. When i am changing the layout from a FlexLayout to a Grid inside the DelayedView, the first tab will display nothing. When i open the next tab which is displaying the same kind of DelayedView(a new object from the same type) it gets displayed correctly. only the first Tab with its content will not be displayed. There is no exception being thrown or displayed in the logcat
To Reproduce Tabviewswitcher
`<tabs:ViewSwitcher x:Name=“Switcher” Animate=“True” SelectedIndex=“{Binding SelectedViewModelIndex, Mode=TwoWay}”>
<tabs:DelayedView x:TypeArguments="contentViews:LobiPageView"
AccentColor="White"
BindingContext="{Binding Page1ViewModel}"
Animate="True"
UseActivityIndicator="True" />
<tabs:DelayedView x:TypeArguments="contentViews:LobiPageView"
BindingContext="{Binding Page2ViewModel}"
AccentColor="{StaticResource Primary}"
Animate="True"
UseActivityIndicator="True" />
<tabs:DelayedView x:TypeArguments="contentViews:LobiPageView"
BindingContext="{Binding Page3ViewModel}"
AccentColor="{StaticResource Primary}"
Animate="True"
UseActivityIndicator="True" />
<tabs:DelayedView x:TypeArguments="contentViews:LobiPageView"
BindingContext="{Binding Page4ViewModel}"
AccentColor="{StaticResource Primary}"
Animate="True"
UseActivityIndicator="True" />
<tabs:DelayedView x:TypeArguments="contentViews:LobiPageView"
BindingContext="{Binding Page5ViewModel}"
AccentColor="{StaticResource Primary}"
Animate="True"
UseActivityIndicator="True" />
</tabs:ViewSwitcher>`
DelayedView ContentView `<StackLayout> <Grid BindableLayout.ItemsSource="{Binding PageItems}" >
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<BindableLayout.ItemTemplate>
<DataTemplate>
… </DataTemplate> </Grid> </stackLayout>`
Screenshots (if applicable)
First Page is not displayed
Scond Tab is displayed correctly with the same contentview

Issue Analytics
- State:
- Created 4 months ago
- Comments:6 (2 by maintainers)

Top Related StackOverflow Question
Try increasing the delay then
I solved this by adding an empty view in ViewSwitcher and an empty tab in the TabHostView. Problem now is the empty tab, even though it is hidden and has a width of 0, it still takes up space. Any ideas how to shrink the width to zero so it only fully “shows” 3 tabs?