I was playing around with the CollectionView on iOS and was facing problems with uneven row height. I saw there was an ItemSizingStrategy introduced lately, but it's still behaving weird though.
DataTemplateGallery CollectionViewGalleryMeasureAllItems to get the following resultItems should have the same height / width when setting ItemSizingStrategy to MeasureAllItems
See above
Reproduces as described.
Is there any known work around (except setting height manually)? At the moment it's really useless with variable dynamic content.
Agreed. This needs to be given priority, imo.
With regards to ItemSizingStrategy, is https://gist.github.com/hartez/7d0edd4182dbc7de65cebc6c67f72e14 current?
It is mentioned here (https://devblogs.microsoft.com/xamarin/xamarin-forms-4-0-feature-preview-an-entirely-new-point-of-collectionview/) as a way to keep track of this component.
I spent some time today trying to use CollectionView on android, and found out that ItemSizingStrategy does not work. A more prominent display of status would have saved me some grief. And time.
Items should have the same height/width when setting ItemSizingStrategy to MeasureAllItems
Is it correct? According to the spec, MeasureFirstItem should produce the same height/width, while MeasureAllItems should measure all items individually.
MeasureFirstItem measures the first item and everything else is given the same dimension. The problem is if you scroll back and forth slowly, items on the left side of the screen change their size,
@hartez @samhouts This seems like a significant gap in the CollectionView spec.
Just wondering if there is any official word on when this will be supported?
This is on the backlog. I don't currently have an estimate of when we may begin work on this item. Thank you for your patience!
@hartez @samhouts is there any update on the progress of this issue? Is there a workaround?
CollectionView looks to solve performance issues we're having with ListView but this issue is a complete blocker for us.
Hi, did we have some news about this issue ?
@PureWeen @samhouts is this shipped in the latest 4.6 stable that was just shipped yesterday? The release notes say it was.
I updated my app to 4.6.0.726, and this is what I see.

Once I scroll the view a little bit, then everything collapses correctly

This is my xaml
<RefreshView Command="{Binding RefreshCommand}"
IsRefreshing="{Binding IsRefreshing}">
<CollectionView x:Name="list"
BackgroundColor="Transparent"
ItemsSource="{Binding VisibleDataObjectCollection}"
ItemsUpdatingScrollMode="KeepScrollOffset"
ItemSizingStrategy="MeasureAllItems"
RemainingItemsThresholdReachedCommand="{Binding LoadNextPageCommand}"
RemainingItemsThreshold="{StaticResource RemainingItemsThreshold}"
SelectionMode="Single"
SelectionChangedCommand="{Binding ShowDetailsCommand}"
SelectionChangedCommandParameter="{Binding SelectedItem, Source={RelativeSource Self}}">
<CollectionView.Behaviors>
<behaviors:ClearSelectedItemAfterSelectionBehavior />
</CollectionView.Behaviors>
<CollectionView.ItemTemplate>
<templateSelectors:FieldListItemSelector x:DataType="models:FieldCropYearListModel">
<templateSelectors:FieldListItemSelector.FieldWithCropTemplate>
<DataTemplate>
<StackLayout Style="{StaticResource RepeaterStack}">
<controlTemplates:TwoRowListItemTemplate VerticalOptions="Fill"
HorizontalOptions="Fill"
PrimaryText="{Binding FieldName}"
SecondaryText="{Binding CropDescription}"
Color="{Binding SeedColour, Converter={StaticResource ColorConverter},ConverterParameter={StaticResource White}}" />
<BoxView Style="{StaticResource HorizontalDivider}" />
</StackLayout>
</DataTemplate>
</templateSelectors:FieldListItemSelector.FieldWithCropTemplate>
<templateSelectors:FieldListItemSelector.FieldWithoutCropTemplate>
<DataTemplate>
<StackLayout Style="{StaticResource RepeaterStack}">
<controlTemplates:SingleRowListItemTemplate VerticalOptions="Fill"
HorizontalOptions="Fill"
Text="{Binding FieldName}" />
<BoxView Style="{StaticResource HorizontalDivider}" />
</StackLayout>
</DataTemplate>
</templateSelectors:FieldListItemSelector.FieldWithoutCropTemplate>
</templateSelectors:FieldListItemSelector>
</CollectionView.ItemTemplate>
<CollectionView.EmptyView>
<controlTemplates:EmptyDataTemplate Text="{x:Static resx:AppResources.FieldsPage_ListEmptyMessage}" />
</CollectionView.EmptyView>
<CollectionView.Header>
<ContentView Padding="3" />
</CollectionView.Header>
<CollectionView.Footer>
<StackLayout Padding="6, 16">
<Button Text="{x:Static resx:AppResources.ActivityListPage_ClearFilter}"
Style="{StaticResource TextOnlyButton}"
IsVisible="{Binding HasFiltersApplied}"
Command="{Binding ClearFiltersCommand}" />
<ActivityIndicator HorizontalOptions="Center"
VerticalOptions="Center"
Color="{StaticResource PrussianBlue}"
IsRunning="{Binding IsLoadingPage}"
IsVisible="{Binding IsLoadingPage}" />
</StackLayout>
</CollectionView.Footer>
</CollectionView>
</RefreshView>
@ChaseFlorell Can you please open a new issue? Thanks!
@samhouts this appears to be the exact same issue. However, I won't be opening a new issue as I'm on my last ONE hour of this contract and I will not have any ability to do follow-up.
Maybe someone else on the team wants to follow up.
@Alex-Wang08 @kelci2017 @GhostTigerXLI
Most helpful comment
@hartez @samhouts This seems like a significant gap in the
CollectionViewspec.Just wondering if there is any official word on when this will be supported?