Skip to content

Instantly share code, notes, and snippets.

@almirvuk
Created August 25, 2017 21:43
<?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="Xamarin.Forms_EFCore.Views.TeamsListPage"
Title="All teams">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Add new"
Icon="ic_add.png"
Command="{Binding AddTeamCommand}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ListView ItemsSource="{Binding AllTeams}"
HasUnevenRows="True"
ItemTapped="OnTeamTapped"
BackgroundColor="#f5f5f5">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid BackgroundColor="White"
Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0"
Text="{Binding Title}"
FontSize="Medium"
Margin="4"
FontAttributes="Bold" />
<StackLayout Orientation="Horizontal"
Grid.Row="1"
Margin="4"
Padding="2">
<Label Text="{Binding StadiumName}"
FontSize="Small" />
<Label Text="{Binding City}"
FontSize="Small" />
</StackLayout>
</Grid>
</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