-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
64 lines (59 loc) · 3.34 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
<Window x:Class="Calculator.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:Calculator"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="247">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.40*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="0.2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Output" VerticalAlignment="Center" FontSize="12" Margin="10"
Text="{Binding Display, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"/>
<Button Grid.Column="1"
Name="Clean" Content="C" Click="Clear_OnClick"
Background="WhiteSmoke" BorderThickness="0"/>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Content="1" Click="Numpad_OnClick"/>
<Button Grid.Row="0" Grid.Column="1" Content="2" Click="Numpad_OnClick"/>
<Button Grid.Row="0" Grid.Column="2" Content="3" Click="Numpad_OnClick"/>
<Button Grid.Row="1" Grid.Column="0" Content="4" Click="Numpad_OnClick"/>
<Button Grid.Row="1" Grid.Column="1" Content="5" Click="Numpad_OnClick"/>
<Button Grid.Row="1" Grid.Column="2" Content="6" Click="Numpad_OnClick"/>
<Button Grid.Row="2" Grid.Column="0" Content="7" Click="Numpad_OnClick"/>
<Button Grid.Row="2" Grid.Column="1" Content="8" Click="Numpad_OnClick"/>
<Button Grid.Row="2" Grid.Column="2" Content="9" Click="Numpad_OnClick"/>
<Button Grid.Row="3" Grid.Column="1" Content="0" Click="Numpad_OnClick"/>
<Button Name="Equals" Grid.Row="3" Grid.Column="0" Content="=" Background="DarkGray" Click="Equals_OnClick"/>
<Button Grid.Row="3" Grid.Column="2" Content="." Background="LightGray" Click="Numpad_OnClick"/>
<Button Grid.Column="3" Grid.Row="0" Content="/" Background="LightGray" Click="Numpad_OnClick"/>
<Button Grid.Column="3" Grid.Row="1" Content="*" Background="LightGray" Click="Numpad_OnClick"/>
<Button Grid.Column="3" Grid.Row="2" Content="-" Background="LightGray" Click="Numpad_OnClick"/>
<Button Grid.Column="3" Grid.Row="3" Content="+" Background="LightGray" Click="Numpad_OnClick"/>
</Grid>
</Grid>
</Grid>
</Window>