I am trying to make a card based listView In Xamarin Forms based off of ahaliav fox's xaml example here however I am not getting anywhere near what he got I only have one text label that I need to display in the card
heres my xaml code:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WebSearch.CountySelect" BackgroundColor="Gray">
<ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame Padding="0,0,0,3">
<Frame.Content>
<Frame Padding="15,15,15,15" OutlineColor="Gray" BackgroundColor="White">
<Frame.Content>
<StackLayout Padding="20,0,0,0" Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
<Label Text="{Binding Name}"
FontFamily="OpenSans-Light"
FontSize="9"
TextColor="#69add1"/>
</StackLayout>
</Frame.Content>
</Frame>
</Frame.Content>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage>
EDIT: I got the ListView item to resemble a card by using a Frame however The text on the label cuts off half way unless I make the text size 9 or lower that's way to small any way to fix this bug?
I have updated my code to reflect the new issue i'm having
any help would be amazing!
Try setting the ListView.HasUnevenRows
property to true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With