xamarin-forms-samples icon indicating copy to clipboard operation
xamarin-forms-samples copied to clipboard

WrapLayout can't handle items with irregular heights

Open roycornelissen opened this issue 10 years ago • 0 comments

For a requirement I was looking for an easy way to create a sort of moodboard with photo's of different sizes. The WrapLayout was a nice way to achieve that but I had to fiddle with the code to have it support photo's that have different heights. This version won't calculate the height correctly since it assumes that all items and rows have the same height.

My fork does this correctly, check this commit: https://github.com/roycornelissen/xamarin-forms-samples/commit/830aa4284468a51218f03b316de81b78b806c074

Full file: https://github.com/roycornelissen/xamarin-forms-samples/blob/master/Evolve13/Evolve13/Controls/WrapLayout.cs

I think the code could be optimised a little bit, but for me it does what I want :)

roycornelissen avatar Feb 27 '15 14:02 roycornelissen