blob: 7f470a4a0b6f6bf512bd82d8addd44efcf0a4536 (
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
37
38
39
40
41
|
<?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.OnPlatform">
<ContentPage.Resources>
<ResourceDictionary>
<OnPlatform x:TypeArguments="FontAttributes" x:Key="fontAttributes">
<OnPlatform.iOS>Bold</OnPlatform.iOS>
<OnPlatform.Android>Italic</OnPlatform.Android>
</OnPlatform>
<OnPlatform x:Key="phone" x:TypeArguments="x:Double" iOS="20" Android="20" WinPhone="30"/>
<OnPlatform x:Key="tablet" x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="60"/>
<OnIdiom x:Key="fontSize" x:TypeArguments="x:Double"
Phone="{StaticResource phone}"
Tablet="{StaticResource tablet}"/>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout>
<Label x:Name="label0" FontAttributes="{StaticResource fontAttributes}" FontSize="{StaticResource fontSize}">
<Label.IsVisible>
<OnPlatform x:TypeArguments="x:Boolean">
<OnPlatform.iOS>true</OnPlatform.iOS>
<OnPlatform.Android>false</OnPlatform.Android>
</OnPlatform>
</Label.IsVisible>
<Label.WidthRequest>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.iOS>20</OnPlatform.iOS>
<OnPlatform.Android>30</OnPlatform.Android>
</OnPlatform>
</Label.WidthRequest>
<Label.Text>
<OnPlatform x:TypeArguments="x:String">
<OnPlatform.iOS>Foo</OnPlatform.iOS>
<OnPlatform.Android>Bar</OnPlatform.Android>
</OnPlatform>
</Label.Text>
</Label>
</StackLayout>
</ContentPage>
|