-
Notifications
You must be signed in to change notification settings - Fork 3
/
Calculator.xaml
81 lines (78 loc) · 6.67 KB
/
Calculator.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
<Window x:Class="DesktopApp.Calculator"
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:DesktopApp"
mc:Ignorable="d"
Loaded="Window_Loaded"
Title="Calculator" Height="450" Width="800">
<Grid Background="#29363F">
<Grid.RowDefinitions>
<RowDefinition Height=".4*"/>
<RowDefinition Height=".6*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height=".53*"/>
<RowDefinition Height=".47*"/>
</Grid.RowDefinitions>
<TextBox x:Name="textBoxOperation" BorderBrush="#618FE0" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="15" Foreground="#FF999FA8" IsReadOnly="True" FontSize="36" Text="Operations will appear here..." Background="Transparent"/>
<TextBox x:Name="textBoxSolution" BorderBrush="#618FE0" Text="Solutions" VerticalContentAlignment="Center" HorizontalContentAlignment="Right" Padding="15" Foreground="#FF999FA8" IsReadOnly="True" FontSize="36" Background="Transparent" Grid.Row="1" FontWeight="Bold"/>
</Grid>
<Grid Grid.Row="1" Background="#FF405462">
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".55*"/>
<ColumnDefinition Width=".45*"/>
</Grid.ColumnDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Column="0" Grid.Row="0" Content="1" FontSize="36" Foreground="#fff" x:Name="buttonOne" Click="ButtonClick" Background="{x:Null}" BorderBrush="#FF999FA8"/>
<Button Grid.Column="1" Grid.Row="0" Background="Transparent" Content="2" FontSize="36" Foreground="#fff" x:Name="buttonTwo" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="2" Grid.Row="0" Background="Transparent" Content="3" FontSize="36" Foreground="#fff" x:Name="buttonThree" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="0" Grid.Row="1" Background="Transparent" Content="4" FontSize="36" Foreground="#fff" x:Name="buttonFour" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="1" Grid.Row="1" Background="Transparent" Content="5" FontSize="36" Foreground="#fff" x:Name="buttonFive" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="2" Grid.Row="1" Background="Transparent" Content="6" FontSize="36" Foreground="#fff" x:Name="buttonSix" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="0" Grid.Row="2" Background="Transparent" Content="7" FontSize="36" Foreground="#fff" x:Name="buttonSeven" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="1" Grid.Row="2" Background="Transparent" Content="8" FontSize="36" Foreground="#fff" x:Name="buttonEight" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="2" Grid.Row="2" Background="Transparent" Content="9" FontSize="36" Foreground="#fff" x:Name="buttonNine" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="3" Grid.Row="2" FontSize="36" Content="Del" Foreground="#fff" x:Name="buttonDel" Click="ButtonClick" BorderBrush="#999FA8" Background="Transparent"/>
<Button Grid.Column="3" Grid.Row="1" Background="Transparent" Content="0" FontSize="36" Foreground="#fff" x:Name="buttonZero" Click="ButtonClick" BorderBrush="#999FA8"/>
<Button Grid.Column="3" Grid.Row="0" Background="Transparent" Content="," FontSize="36" Foreground="#fff" x:Name="buttonPoint" Click="ButtonClick" BorderBrush="#999FA8"/>
</Grid>
<Border BorderThickness="1 0 0 0" Grid.Column="1" BorderBrush="#405462" Background="#618FE0">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Column="0" Grid.Row="0" Background="Transparent" Content="+" FontSize="36" Foreground="#fff" x:Name="buttonPlus" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="1" Grid.Row="0" Background="Transparent" Content="-" FontSize="36" Foreground="#fff" x:Name="buttonMinus" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="2" Grid.Row="0" Background="Transparent" Content="x" FontSize="36" Foreground="#fff" x:Name="buttonTimes" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="2" Grid.Row="1" Background="Transparent" Content="/" FontSize="36" Foreground="#fff" x:Name="buttonDevide" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="1" Grid.Row="1" Background="Transparent" Content="%" FontSize="36" Foreground="#fff" x:Name="buttonMod" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="0" Grid.Row="1" Background="Transparent" Content="()" FontSize="36" Foreground="#fff" x:Name="buttonParenthese" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="0" Grid.Row="2" Background="Transparent" Content="C" FontSize="36" Foreground="#fff" x:Name="buttonReset" Click="ButtonOp" BorderBrush="#405462"/>
<Button Grid.Column="1" Grid.Row="2" Background="Transparent" Content="?" FontSize="36" Foreground="#fff" x:Name="buttonEquals" Click="funnyFact" BorderBrush="#405462"/>
<Button Grid.Column="2" Grid.Row="2" Background="#78E08F" Content="=" FontSize="36" Foreground="#fff" x:Name="buttonHistory" Click="ButtonOp" BorderBrush="#405462"/>
</Grid>
</Border>
</Grid>
</Grid>
</Window>