forked from davidortinau/build2017-new-in-xamarin-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHistoryPage.xaml
129 lines (126 loc) · 7.02 KB
/
HistoryPage.xaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?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="Weather.Forms.HistoryPage">
<Grid BackgroundColor="#002050">
<Image Source="buildheader.jpg" VerticalOptions="Start" />
<StackLayout VerticalOptions="Fill">
<StackLayout.Margin>
<OnIdiom x:TypeArguments="Thickness">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="10,80,10,10"></On>
<On Platform="WinRT, UWP, Android" Value="10"></On>
</OnPlatform>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="10,80,10,10"></On>
<On Platform="WinRT, UWP, Android" Value="10"></On>
</OnPlatform>
</OnIdiom.Tablet>
<OnIdiom.Desktop>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinRT, UWP" Value="20"></On>
</OnPlatform>
</OnIdiom.Desktop>
</OnIdiom>
</StackLayout.Margin>
<BoxView HeightRequest="20"/>
<Label Text="Your Places">
<Label.TextColor>
<OnPlatform x:TypeArguments="Color">
<On Platform="Android" Value="GhostWhite"></On>
<On Platform="UWP, iOS" Value="White"></On>
</OnPlatform>
</Label.TextColor>
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="24"></On>
<On Platform="WinRT, UWP, Android" Value="18"></On>
</OnPlatform>
</Label.FontSize>
</Label>
<ListView x:Name="HistoryItems" VerticalOptions="Fill" BackgroundColor="Transparent">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="100"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Text="{Binding WeatherIcon}" FontSize="18" Grid.Column="0" VerticalTextAlignment="Center" TextColor="White">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="UWP" Value="/Assets/WeatherIcons.ttf#Weather Icons"></On>
<On Platform="iOS" Value="Weather Icons"></On>
<On Platform="Android" Value="WeatherIcons.ttf#Weather Icons"></On>
</OnPlatform>
</Label.FontFamily>
</Label>
<Label Text="{Binding LocationName}" Grid.Column="1" VerticalOptions="Center" TextColor="White">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="18"></On>
<On Platform="WinRT, UWP, Android" Value="14"></On>
</OnPlatform>
</Label.FontSize>
</Label>
<Label Text="{Binding PostalCode}" VerticalOptions="Center" TextColor="White" Grid.Column="2" VerticalTextAlignment="Center">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="18"></On>
<On Platform="WinRT, UWP, Android" Value="14"></On>
</OnPlatform>
</Label.FontSize>
</Label>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="{Binding PlatformName}" TextColor="White" VerticalTextAlignment="Center">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="24"></On>
<On Platform="WinRT, UWP, Android" Value="18"></On>
</OnPlatform>
</Label.FontSize>
</Label>
<Label TextColor="Red" VerticalTextAlignment="Center">
<Label.Text>
<OnPlatform x:TypeArguments="x:String">
<On Platform="UWP" Value=""></On>
<On Platform="iOS" Value=""></On>
<On Platform="Android" Value=""></On>
</OnPlatform>
</Label.Text>
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="24"></On>
<On Platform="WinRT, UWP, Android" Value="18"></On>
</OnPlatform>
</Label.FontSize>
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="UWP" Value="Segoe MDL2 Assets"></On>
<On Platform="iOS" Value="FontAwesome"></On>
<On Platform="Android" Value="FontAwesome.otf#FontAwesome"></On>
</OnPlatform>
</Label.FontFamily>
</Label>
<Label Text=" Xamarin.Forms" VerticalTextAlignment="Center" TextColor="White">
<Label.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="iOS" Value="24"></On>
<On Platform="WinRT, UWP, Android" Value="18"></On>
</OnPlatform>
</Label.FontSize>
</Label>
</StackLayout>
</StackLayout>
</Grid>
</ContentPage>