blob: 38ad4753e8f6564b4ca1b26522d8532d6f372bd6 (
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
|
<?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>
|