blob: d1c233b79560fb915c5d1893d0af5b7636c6d1d2 (
plain)
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
|
<?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.Xaml.UnitTests.DataTemplate"
xmlns:local="clr-namespace:Xamarin.Forms.Xaml.UnitTests">
<ContentPage.Resources>
<ResourceDictionary>
<DataTemplate x:Key="celltemplate">
<TextCell Text="{Binding}"/>
</DataTemplate>
<local:ReverseConverter x:Key="reverseConverter"/>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout>
<ListView x:Name="emptyTextCell">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView x:Name="textCell">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView x:Name="fromResource" ItemTemplate="{StaticResource celltemplate}" />
<ListView x:Name="textCellAccessResource">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Path=., Converter={StaticResource reverseConverter}}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView x:Name="viewCellAccessResource">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell><Label Text="{Binding Path=., Converter={StaticResource reverseConverter}}"/></ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>
|