summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/StyleTests.xaml
blob: 8b875510e592ed3b236a2cfbf4538b8d4ae34a47 (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
25
26
27
28
29
30
31
32
33
34
35
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>