summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml24
1 files changed, 24 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml b/Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml
new file mode 100644
index 00000000..38ad4753
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/ControlTemplateXamlPage.xaml
@@ -0,0 +1,24 @@
+<?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.Controls.GalleryPages.ControlTemplateXamlPage">
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <ControlTemplate x:Key="ViewTemplate">
+ <StackLayout>
+ <Label Text="{TemplateBinding Parent.AboveText}" />
+ <ContentPresenter />
+ <Label Text="Below" />
+ </StackLayout>
+ </ControlTemplate>
+ <Style TargetType="ContentView">
+ <Style.Setters>
+ <Setter Property="ControlTemplate" Value="{StaticResource ViewTemplate}" />
+ </Style.Setters>
+ </Style>
+ </ResourceDictionary>
+ </ContentPage.Resources>
+ <ContentView>
+ <Label Text="I R CONTENT" />
+ </ContentView>
+</ContentPage> \ No newline at end of file