Forum Cross Platform with Xamarin

details page content displays correctly but listview page items are present but blank.

The list shows correct # of items but the items are empty however the details page shows the correct content. The xaml and code behind for both
are attached. this code is vs2019 pro based in mobile app with shared lib and and android, ios, uwp and web projects.

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited May 20

    The binding path for Image inside ViewCell is not incorrect , modify your code as below .

    NewGamePage

                    <ViewCell>
                              <StackLayout Orientation="Horizontal" HorizontalOptions="Fill" BackgroundColor="Green">
                                     <StackLayout Orientation="Vertical">
                                             <Image Source="{Binding Column1.CardImageUrl}" HorizontalOptions="CenterAndExpand"/>
                                              <Image Source="{Binding Column2.CardImageUrl}" HorizontalOptions="CenterAndExpand"/>
                                               <Image Source="{Binding Column3.CardImageUrl}" HorizontalOptions="CenterAndExpand"/>
                                               <Image Source="{Binding Column4.CardImageUrl}" HorizontalOptions="CenterAndExpand"/>
                                         </StackLayout>
                                   </StackLayout>
                      </ViewCell>
    
  • wtfinkwtfink USMember ✭✭

    i modified with your changes to my listview data bindings and get the same results. the images dont appear in the listview like they do in the details view. I appreciate any further suggestions and thanks for your effort.

  • ColeXColeX Member, Xamarin Team Xamurai

    Can you try to hard code the source on image to see if it is shown up in ListView item .

                      <ViewCell>
                                            <StackLayout Orientation="Horizontal" HorizontalOptions="Fill" BackgroundColor="Green">
                                                <StackLayout Orientation="Vertical">
                                                    <Image Source="yourimage.png" HorizontalOptions="CenterAndExpand"/>
                                                    <Image Source="yourimage.png" HorizontalOptions="CenterAndExpand"/>
                                                    <Image Source="yourimage.png" HorizontalOptions="CenterAndExpand"/>
                                                    <Image Source="yourimage.png" HorizontalOptions="CenterAndExpand"/>
                                                </StackLayout>
                                            </StackLayout>
                                        </ViewCell>
    
  • wtfinkwtfink USMember ✭✭

    no the listview still does not show any card in any of the 30 entries.

  • ColeXColeX Member, Xamarin Team Xamurai

    I test your code it works fine on my side .

    Would you mind sharing us a basic sample which could reproduce this issue ?

    Just zip the project and attach in the comment.

  • wtfinkwtfink USMember ✭✭

    the vs2019 solution is in this zip. The problem is against the UWP project. Thats the first but not last project to be tested.

  • ColeXColeX Member, Xamarin Team Xamurai

    Check the logic of populating data , the items in viewmodel in null .

Sign In or Register to comment.