Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (45 sloc) 2.26 KB
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Xamarin_MobileApps_Demo"
x:Class="Xamarin_MobileApps_Demo.MainPage">
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontSize" Value="16"></Setter>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="{Binding RecordsCount}"></Label>
<Label Text="Records"></Label>
</StackLayout>
<ListView Grid.Row="1" ItemsSource="{Binding Items}" CachingStrategy="RecycleElement" ItemAppearing="ListView_ItemsAppearing">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="20,5,20,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Text="{Binding Id}"></Label>
<Label Text="{Binding Name}" Grid.Column="1"></Label>
<Label Text="{Binding ProductNumber}" Grid.Column="2"></Label>
<Label Text="{Binding Color}" Grid.Column="3"></Label>
<Label Text="{Binding Size}" Grid.Column="4"></Label>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</ContentPage>