Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:behaviors="clr-namespace:AwesomeSeries.Behaviors;assembly=AwesomeSeries"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AwesomeSeries.Views.MainView">
<ContentPage.Content>
<ListView
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
HasUnevenRows="True"
SeparatorColor="DimGray"
CachingStrategy="RecycleElement"
ItemsSource="{Binding Items}"
behaviors:AttachedItemTappedBehavior.Command="{Binding ItemClickCommand}"
>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout
Orientation="Horizontal"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<Image Source="{Binding Poster}"
VerticalOptions="Start"
HorizontalOptions="Start"
HeightRequest="120" />
<StackLayout>
<Label Text="{Binding Name}" FontSize="Medium" />
<Label Text="{Binding OriginalName}" FontSize="Small" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment