forked from jamesmontemagno/Xamarin.Forms-Monkeys
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MonkeysPage.xaml
63 lines (59 loc) · 3.02 KB
/
MonkeysPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?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="Monkeys2.Views.MonkeysPage"
xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.UseSafeArea="true"
Title="Traditional Monkey">
<ContentPage.Content>
<StackLayout>
<Label Margin="10,0"
FontSize="Large"
Text="{Binding MonkeyCount, StringFormat='{0} Monkeys'}"/>
<ListView ItemsSource="{Binding MonkeysList}"
SelectedItem="{Binding SelectedMonkey, Mode=TwoWay}"
GroupDisplayBinding = "{Binding Heading}"
HasUnevenRows="true"
IsGroupingEnabled = "true"
>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="10"
RowSpacing="10"
ColumnSpacing="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<controls:CircleImage
BorderColor="Aqua"
BorderThickness="3"
HeightRequest="66"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
Aspect="AspectFill"
WidthRequest="66"
Grid.RowSpan="2"
Source="{Binding Image}"/>
<Label Grid.Column="1"
Text="{Binding Name}"
VerticalOptions="End"/>
<Label Grid.Column="1"
Grid.Row="1"
VerticalOptions="Start"
Text="{Binding Location}"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
</ContentPage>