Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin] Tab resizing on click #49

Open
conor-codes opened this issue Feb 14, 2022 · 5 comments
Open

[Xamarin] Tab resizing on click #49

conor-codes opened this issue Feb 14, 2022 · 5 comments

Comments

@conor-codes
Copy link

Platform

  • OS: [iOS] (Not tested android)
  • Device: Iphone XS
  • Sdk vervion: 15.2.0.17
  • Xamarin.Forms: 5.0.0.2196

Describe the bug
When having multiple tabs, if one of the tabs has content in a list view / collection view that goes off the screen, once the page is loaded if you click on another tab and go back to the original the tab will reduce in size every time. This doesn't happen on the first load.

Screenshots (if applicable)
ezgif-3-2c3ec5c3dc

@roubachof
Copy link
Owner

Give a fixed HeightRequest to the TabHostView

@conor-codes
Copy link
Author

I have a heightrequest set, it still gives the error:

<tabs:TabHostView x:Name="TabHost"
HeightRequest="50"
BackgroundColor="{StaticResource HighlightBlue}"
SelectedIndex="{Binding Source={x:Reference Switcher}, Path=SelectedIndex, Mode=TwoWay}">
tabs:TabHostView.Tabs
<tabs:UnderlinedTabItem Label="On Demand" Style="{StaticResource TabStyle}"/>
<tabs:UnderlinedTabItem Label="Live Classes" Style="{StaticResource TabStyle}"/>
</tabs:TabHostView.Tabs>
</tabs:TabHostView>

@roubachof
Copy link
Owner

mmh that's weird, as a workaround try putting it on the UnderlinedTabs as well

@conor-codes
Copy link
Author

Still the same result, i'll create a demo project and upload it if that would be any easier?

@Tremco-MBlodgett
Copy link

Hey I was playing around with this and there was a similar issue with UWP. Try setting the MinimumHeightRequest on the TabHostView to the same HeightRequest you set.

@roubachof roubachof changed the title Tab resizing on click [Xamarin] Tab resizing on click Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants