roubachof/Sharpnado.CollectionView

[Question] How to set HasUnvenRow=true or SizingTechnique=MeasureAllItem for Vertical CollectionView

Closed this issue · 2 comments

My ViewCells have different size and also I do update size on runtime through show hide of item.So I cannot specify fixed Item size.
Is there any way to set HasUnvenRow=true or SizingTechnique=MeasureAllItem For Vertical collection view
I am using this library as Xamarin collection is not updating cell height on runtime for both listview and collectionview for iOS

Note : I am using vertical layout.I know I am supposed to specify item size for horizontal list but it should not necessary for vertical list right

Can't be.. this is the whole philosophy of the Sharpnado CollectionView, don't measure it self, specify static height by data template to allow cell reuse. If you measure all, it breaks cell reuse philosophy since you have to make a layout pass for each cell displayed, and you will end up with terrible performance. You can achieve cell reuse and different heights by DataTemplate using SizedDataTemplate .

Got it so size change on runtime will also not work even with SizedDataTemplate unless I call uiCollectionView.ReloadData(); by myself