AndreiMisiukevich / CardView

CardsView | CarouselView | CoverflowView | CubeView for Xamarin.Forms
MIT License
710 stars 114 forks source link

Content of cached item in carousel view not always redraws/layout properly #391

Closed rheesbeen closed 3 years ago

rheesbeen commented 3 years ago

Hi,

We are using the carouselview with dynamic content (it is still a single datatemplate). So when the bindingcontext changes the content also changes per item. Sometimes the page isn't update properly when we navigate to a close by page (so I presume they are cached, which we like ;)). We see that the layout isn't correct, the height of items in a stacklayout aren't correct for instance. When we navigate a bit out of range, then it fixes itself again.

Is there a way we can force a re-layout? Hopefully without doing it twice?

Greetz, Richard.

AndreiMisiukevich commented 3 years ago

First of all try to set IsViewReusingEnabled = False

If it doesn't help, try to call carousel.ForceRedrawViews() somewhere