-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
29 lines (29 loc) · 2.09 KB
/
MainWindow.xaml
File metadata and controls
29 lines (29 loc) · 2.09 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
<Window x:Class="Math.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:Math"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<DockPanel LastChildFill="True">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="8">
<Button Width="100" Height="25" Command="{Binding StartCommand}" CommandParameter="{Binding Generate}">开始</Button>
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">生成</TextBlock>
<TextBox Text="{Binding Generate}" Margin="5 0 0 0" Width="200" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"></TextBox>
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">道</TextBlock>
<TextBlock Margin="25 0 0 0" VerticalAlignment="Center">只算19以内乘法</TextBlock>
<CheckBox Margin="5 0 0 0" IsChecked="{Binding Less20}" VerticalAlignment="Center"></CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="8">
<TextBlock FontSize="15" Text="总共:"></TextBlock>
<TextBlock Margin="5 0 0 0" FontSize="15" Text="{Binding Total}"></TextBlock>
<TextBlock Margin="20 0 0 0" FontSize="15" Text="当前:"></TextBlock>
<TextBlock Margin="5 0 0 0" FontSize="15" Text="{Binding Current}"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="{Binding Formula}" FontSize="100"></TextBlock>
<TextBox Text="{Binding Result}" KeyDown="TextBox_KeyDown" Foreground="{Binding Foreground}" TextChanged="TextBox_TextChanged" Width="400" BorderThickness="0" FontSize="100" HorizontalContentAlignment="Center"></TextBox>
</StackPanel>
</DockPanel>
</Window>