-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
122 lines (112 loc) · 4 KB
/
MainWindow.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
<Window
x:Class="WeatherApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WeatherApp"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Weather App"
Width="790"
Height="650"
mc:Ignorable="d">
<Window.Resources>
<Style x:Key="DataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="#D3D3D3" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="5" />
</Style>
<Style x:Key="DataGridCellTextStyle" TargetType="TextBlock">
<Setter Property="Padding" Value="5,0,5,0" />
</Style>
</Window.Resources>
<Window.Background>
<ImageBrush ImageSource="assets/images/background.jpg" Stretch="UniformToFill" />
</Window.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Name="WeatherLabel"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="300"
Height="150"
Margin="10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="24"
Style="{StaticResource MaterialDesignHeadline1TextBlock}"
Text="" />
<Image
Name="WeatherIcon"
Grid.Row="0"
Grid.Column="2"
Height="150"
Margin="10" />
<TextBlock
Name="LocationLabel"
Grid.Row="0"
Grid.Column="1"
Margin="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="24"
Foreground="Black"
Style="{StaticResource MaterialDesignHeadline1TextBlock}"
Text="" />
<!-- Title for hourly weather updates -->
<TextBlock
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="0,10,0,10"
HorizontalAlignment="Center"
FontSize="20"
FontWeight="Bold"
Foreground="Black"
Text="Hourly Update" />
<!-- Section for hourly weather updates -->
<ScrollViewer
Grid.Row="3"
Grid.ColumnSpan="3"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled">
<StackPanel Name="HourlyWeatherPanel" Orientation="Horizontal" />
</ScrollViewer>
<!-- Title for forecast -->
<TextBlock
Name="ForecastTitleLabel"
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="0,10,0,10"
HorizontalAlignment="Center"
FontSize="20"
FontWeight="Bold"
Foreground="Black"
Text="Forecast" />
<!-- Section for forecast weather updates -->
<ScrollViewer
Grid.Row="5"
Grid.ColumnSpan="3"
Height="150"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled">
<StackPanel Name="ForecastWeatherPanel" Orientation="Horizontal" />
</ScrollViewer>
</Grid>
</Window>