I have a list of images and I want to display them so that the width of each image fits the entire screen, while preserving the aspect ratio. I'm using a list view like the following:
<ListView x:Name="imageListView">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Image Source="{Binding .}" HorizontalOptions="FillAndExpand" />
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
However, the images still show up with a height of 40, since the ListView sets an equal height for the entire table. I'm currently thinking of writing a custom ListView renderer which extends the default renderer, but I'm not sure which methods I should override (or if it's doable at all). Can anyone point me in the right direction?