roubachof / Sharpnado.CollectionView

A performant list view supporting: grid, horizontal and vertical layout, drag and drop, and reveal animations.
The Unlicense
245 stars 30 forks source link

Reordering Sharpnado.Forms.HorizontalListView goes wrong #35

Closed gannesh1996 closed 2 years ago

gannesh1996 commented 3 years ago

Hey!

I have a Xamarin.Forms app which uses Sharpnado.Forms.HorizontalListView to show frames and enables the user to drag and drop these frames. It works perfectly fine, but now I want to add something extra and that is causing some issues.

When the user taps on a frame, the screen should split in two halves: the HorizontalListView on one half and a window with information on the other side. When I start the app where the HorizontalListView is fullscreen, everything works. When I start the app where the HorizontalListView is on one half only, everything works again. The problem: what I do now is simply using a grid and update the columnspan on tap. So the columnspan starts with 2, but when I tap a frame it turns to 1 so that the HorizontalListView ends up at one half. The frames however are not ordered anymore, they are simple squeezed to together to fit the half of the window (so the padding in between is gone for some reason).

I use this to switch to a split screen: img1

I cannot show a demo and I think the code here is not really needed here, but I can visualize it.

Normal window: img2

Split window (what is expected): img3

Split window (what actually happens): img4

Does someone know why this happens and how to solve it?

If something is unclear, please let me know.

roubachof commented 3 years ago

You can try to reset the ItemsSource, it will maybe force re-layout.

roubachof commented 2 years ago

closing as no answer has been provided.