Forum Xamarin.iOS

First item not rendered when using Collectionview horizontallist

I am creating a collectionview in my forms application and while the android version works, the ios version does not.

<CollectionView x:Name="cvContent" Scrolled="CvContent_OnScrolled" ItemsLayout="HorizontalList">
                <ContentView  Content="{Binding Content}" WidthRequest="{x:OnPlatform Android=425, iOS=375}"/>

and in my codebehind
cvContent.ItemsSource = new List() {new tabHome(), new tabSocial()};

The content (tabHome,tabSocial) contain a flexgrid of items, but I don't believe that is the problem since If I change the order of the items it's always the first one that does not show. If I change the layout to vertical, everything renders correctly, but not for horizontal. It seems that It is rendered, then immediately cleared. Has anyone ever seen this behavior? I feel that the Caroselview would work better for my needs, but waiting for it to lose the experimental flag.


Best Answer

  • StephenMorrisonStephenMorrison USMember ✭✭
    Accepted Answer

    Turns out that the image I was using was causing the problem because I am loading the image from a url and resizing it.


Sign In or Register to comment.