hi all ,
i am using CarouselView with image template, but I am sliding images forwardly everything is ok but when I am sliding backward the previous images are shown in white
this is my xaml code
what am I doing wrong ?
<CarouselView x:Name="TheCarousel" ItemsSource="{Binding ImageSources}" > <CarouselView.ItemTemplate> <DataTemplate> <Image Source="{Binding .}"> </Image> </DataTemplate> </CarouselView.ItemTemplate> </CarouselView>
Move your images into Resource folder in iOS project , and access the image from specific project using the following code
for (int i = 0; i < 7; i++) { var imageName = $"photo_ada_{i + 1}.jpg"; var imageSource = ImageSource.FromFile(imageName); tmpImageSources.Add(imageSource); }
Problem solved .
Answers
Try to wrap the image with a layout and set height and width on it .
unfortunately that does not change anything
Could you provide a basic project to help us reproduce the problem ?
Zip your project and attach here .
thanks for your support
i uploaded the project, please see the attachment
I am testing with iPhone 5s simulator and on a real iPhone 11 device. the
Move your images into Resource folder in iOS project , and access the image from specific project using the following code
Problem solved .
thank you very much for helps! it works now!
is it a xamarin bug? why is not working from PCL project?
I'm not sure , but we recommend you use image in specific project .