summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml36
1 files changed, 36 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml b/Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml
new file mode 100644
index 00000000..8b875510
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml
@@ -0,0 +1,36 @@
+<?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.StyleTests">
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <Style TargetType="Label">
+ <Setter Property="Label.TextColor" Value="Red"/>
+ </Style>
+ <Style x:Key="styleKey0" x:Name="style0" TargetType="Label">
+ <Setter Property="Label.Text" Value="FooBar"/>
+ <Setter Property="Label.BackgroundColor" Value="Pink"/>
+ </Style>
+ <Style x:Key="styleKey1" x:Name="style1" TargetType="Label">
+ <Setter Property="Label.Height" Value="42"/>
+ <Setter Property="Label.BackgroundColor" Value="Pink"/>
+ <Setter Property="Image.Source" Value="foo.png"/>
+ </Style>
+ <Style TargetType="Label" x:Key="style0" x:Name="style2">
+ <Setter Property="Text" Value="foo"/>
+ <Setter Property="BackgroundColor" Value="Red"/>
+ </Style>
+ <Style x:Key="labelStyle" TargetType="Label"
+ BaseResourceKey="TitleStyle">
+ <Setter Property="TextColor" Value="Red" />
+ </Style>
+ </ResourceDictionary>
+ </ContentPage.Resources>
+ <StackLayout>
+ <Label x:Name="label0" Style="{StaticResource styleKey0}"/>
+ <Label x:Name="label1" />
+ <Label x:Name="labelWithStyleDerivedFromDynamic_StaticResource" Style="{StaticResource labelStyle}"/>
+ <Label x:Name="labelWithStyleDerivedFromDynamic_DynamicResource" Style="{DynamicResource labelStyle}"/>
+ </StackLayout>
+</ContentPage> \ No newline at end of file