summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml b/Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml
new file mode 100644
index 00000000..d1c233b7
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/DataTemplate.xaml
@@ -0,0 +1,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> \ No newline at end of file