-
Notifications
You must be signed in to change notification settings - Fork 16
/
ListViewDemoPage.xaml
32 lines (30 loc) · 1.46 KB
/
ListViewDemoPage.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
<?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:customControls="clr-namespace:xamformsdemo.CustomControls;assembly=xamformsdemo"
x:Class="xamformsdemo.ListViewDemoPage"
BackgroundColor="#888888"
Title="ListView Selected Colour">
<ListView VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
BackgroundColor="Black"
HasUnevenRows="False"
IsPullToRefreshEnabled="False"
ItemsSource="{Binding .}"
RowHeight="52"
>
<ListView.ItemTemplate>
<DataTemplate>
<!--<TextCell TextColor="Black" Detail="{Binding .LastUpdated}" DetailColor="Red" Text="{Binding .ItemName}" />-->
<customControls:ExtendedViewCell SelectedBackgroundColor="Teal">
<ViewCell.View>
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Orientation="Vertical" Padding="4" Spacing="8">
<Label TextColor="White" Text="{Binding .ItemName}"/>
<Label TextColor="Yellow" Text="{Binding .LastUpdated, StringFormat='Last seen: {0:HH:mm:ss}'}"/>
</StackLayout>
</ViewCell.View>
</customControls:ExtendedViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage>