-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[CollectionView] CollectionView Expands to full screen with FlexLayout #5763
Comments
I think this is pretty consistent with our expectations. The CollectionView is meant to expand to its available vertical space. The StackLayout is meant to adjust the height of all items appropriately, so it effectively sets the height of its children. Thanks! |
FlexLayout should also adjust the height of all items appropriately. It is not doing so. The problem is with FlexLayout. |
Do we have any documentation stating this?. If so can you please update me the links? I don't see any information as you said in below documentation. If you still consider this as a behavior, can we add this as a new feature request or an enhancement for some Xamarin controls to achieve this expected behavior (Refer the screenshot for ease)? |
CollectionView should only take up the space needed to display the items, if we want to take up the entire screen we would specify this as we do with everything else. |
This is still a bug in Xamarin.Forms 4.3 and has not been resolved. I used a StackLayout and Grid in the collection view and gave it a height yet I get a huge space I don't need from the CollectionView. The slider in the image below is supposed to be immediately after the collection View but I have this huge space. This is an urgent need for me. I have to deliver on this project soon. |
This is extremely silly that you can't center a collectionview when you don't have enough items to fill the screen. Instead of saying it's designed that way... please fix it. How does anyone know ahead of time how may items the user will have. Ridiculous. |
This seems to be a very effective workaround :) |
A recommendation: In short, when displaying a collection that does not expand on the whole screen use
Otherwise use Hope this helps. |
Description
I have developed a screen for an app. When FlexLayout is the Content of the ContentPage the CollectionView expand to whole screen. Whereas when StackLayout is the Content of the ContentPage the CollectionView takes remaining space after adjusting all other views.
Steps to Reproduce
Run my sample and swap FlexLayout with StackLayout.
Basic Information
Version with issue: Xamarin.Forms-pre7
IDE: Visual Studio for Mac Preview
Affected Devices: iOS and Android
Reproduction Link
MyApp.zip
The text was updated successfully, but these errors were encountered: