Using .net MAUI 8
I am breaking my head over this… I have a carouselview which appears to be working well in iOS simulator but once deployed to a physical device, does not behave as anticipated.
I am binding the Image “Source” property in a CarouselView’s Datatemplate to a collection of strings that contain the file names of MauiImage resources from my project. See below:
<CarouselView ItemsSource="{Binding Images}" IndicatorView="indicatorView">
<CarouselView.ItemTemplate>
<DataTemplate>
<Image Source="{Binding .}"/>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
As mentioned, the “Images” is a collection of strings that match the names of the MauiImages in my resources/images folder.
All the images in the project are defined in the .csproj file as <MauiImage>
I know the correct case sensitive file names are being loaded into the binding, because if I replace the Image with a Label – the correct name appears.
I tried the whole thing with an EmbeddedResource instead of a MauiImage (and used it as is or with the community toolkit ImageResourceConverter) with no luck
Can anyone help me understand where I went wrong?
Thanks!