Repository navigation
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
70 lines (62 loc) · 3.73 KB
/
Copy pathMainWindow.xaml
File metadata and controls
70 lines (62 loc) · 3.73 KB
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
<Window x:Class="WeatherDesktop.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WeatherDesktop"
xmlns:ViewModel="clr-namespace:WeatherDesktop.ViewModels"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="800">
<Window.DataContext>
<ViewModel:MainVM></ViewModel:MainVM>
</Window.DataContext>
<Grid Background="AliceBlue">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="5*"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBox TextChanged="enterCity_TextChanged" x:Name="enterCity" FontSize="16" Grid.Column="1"></TextBox>
<StackPanel Grid.Column="1" Grid.Row="1">
<Label FontSize="36" Content="{Binding City, UpdateSourceTrigger=PropertyChanged}"></Label>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label FontSize="24">Температура:</Label>
<Label FontSize="24" Content="{Binding Temperature, UpdateSourceTrigger=PropertyChanged}"></Label>
<Label FontSize="24">°C</Label>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label FontSize="18">Ощущается как: </Label>
<Label FontSize="18" Content="{Binding FeelsLike, UpdateSourceTrigger=PropertyChanged}"></Label>
<Label FontSize="18">°C</Label>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label FontSize="18">Давление: </Label>
<Label FontSize="18" Content="{Binding Pressure, UpdateSourceTrigger=PropertyChanged}"></Label>
<Label FontSize="18">мм рт. ст.</Label>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label FontSize="18">Влажность: </Label>
<Label FontSize="18" Content="{Binding Humidity, UpdateSourceTrigger=PropertyChanged}"></Label>
<Label FontSize="18">%</Label>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label FontSize="18">Скорость ветра:</Label>
<Label FontSize="18" Content="{Binding SpeedOfWind, UpdateSourceTrigger=PropertyChanged}"></Label>
<Label FontSize="18">м/с</Label>
</StackPanel>
<Image Source="{Binding ImagePath, UpdateSourceTrigger=PropertyChanged}" Margin="0,0,50,0" HorizontalAlignment="Right" Height="100" Width="100"></Image>
</StackPanel>
<Button Background="White" Command="{Binding ButtonClick, UpdateSourceTrigger=PropertyChanged}" Grid.Column="2" Grid.Row="2">
<Grid>
<Polygon Points="100,25 125,0 200,25 125,50" Fill="LightSteelBlue"></Polygon>
<Polygon Points="100,25 75,0 0,25 75,50" Fill="CornflowerBlue"></Polygon>
<Label FontWeight="Bold" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center">Обновить</Label>
</Grid>
</Button>
</Grid>
</Window>