summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml b/Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml
new file mode 100644
index 00000000..524db152
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/StyleXamlGallery.xaml
@@ -0,0 +1,17 @@
+<?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.StyleXamlGallery">
+<ContentPage.Resources>
+ <ResourceDictionary>
+ <Style x:Key="customStyle" TargetType="Label" BaseResourceKey="SubtitleStyle">
+ <Setter Property="Label.TextColor" Value="Color.Pink"/>
+ </Style>
+ </ResourceDictionary>
+</ContentPage.Resources>
+ <StackLayout>
+ <Label Text="This uses TitleStyle" Style="{DynamicResource TitleStyle}"/>
+ <Label Text="This uses SubtitleStyle" Style="{DynamicResource SubtitleStyle}"/>
+ <Label Text="This uses BodyStyle" Style="{DynamicResource BodyStyle}"/>
+ <Label Text="This uses CaptionStyle" Style="{DynamicResource CaptionStyle}"/>
+ <Label Text="This uses a custom style inherited from SubtitleStyle" Style="{StaticResource customStyle}"/>
+ </StackLayout>
+</ContentPage>