1,6 → 1,7 |
<Window x:Class="KeyPad.Keypad" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:local="clr-namespace:KeyPad" |
Title="MainWindow" Height="313" Width="299" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" > |
<Window.Resources> |
<DropShadowEffect x:Key="DropShadowEffect" |
117,21 → 118,21 |
<Grid Grid.Row="1"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button Name="button5" Background="WhiteSmoke" BorderThickness="1" |
Command="{Binding Path=PressAndRelease}" CommandParameter="NUMPAD7" Click="button_Click">7</Button> |
CommandParameter="NUMPAD7" Click="button_Click">7</Button> |
</Grid> |
<Grid Grid.Column="1" Grid.Row="1"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button6" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD8" Click="button_Click" BorderThickness="1" Content="8" /> |
CommandParameter="NUMPAD8" Click="button_Click" BorderThickness="1" Content="8" /> |
</Grid> |
<Grid Grid.Column="2" Grid.Row="1"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button7" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD9" Click="button_Click" Content="9" /> |
CommandParameter="NUMPAD9" Click="button_Click" Content="9" /> |
</Grid> |
<Grid Grid.Column="3" Grid.Row="1"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button8" Command="{Binding PressAndRelease}" CommandParameter="BACK" Click="button_Click"> |
<Button x:Name="button8" CommandParameter="BACK" Click="button_Click"> |
<Path Stretch="Fill" Width="36" Height="24" Data="F1M555.0371,274.4893L552.7871,276.7383L549.9861,273.9373L547.1991,276.7243L545.1131,274.6393L547.9001,271.8523L545.0101,268.9603L547.2601,266.7113L550.1501,269.6023L552.8921,266.8613L554.9761,268.9463L552.2361,271.6883z M555.3751,264.0003L544.8751,264.0003C543.1251,264.1253,535.0001,270.7503,535.0001,272.2503C535.0001,273.7503,543.1251,279.3753,544.8751,279.5003L555.3751,279.5003C558.8751,279.5003,559.3751,277.7093,559.3751,275.5003L559.3751,268.0003C559.3751,265.7913,558.7501,264.0003,555.3751,264.0003" Fill="#FF333333"/> |
</Button> |
</Grid> |
138,59 → 139,60 |
<Grid Grid.Row="2"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button9" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD4" Click="button_Click" Content="4"/> |
CommandParameter="NUMPAD4" Click="button_Click" Content="4"/> |
</Grid> |
<Grid Grid.Column="1" Grid.Row="2"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button10" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD5" Click="button_Click" Content="5" /> |
CommandParameter="NUMPAD5" Click="button_Click" Content="5" /> |
</Grid> |
<Grid Grid.Column="2" Grid.Row="2"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button11" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD6" Click="button_Click" Content="6" /> |
CommandParameter="NUMPAD6" Click="button_Click" Content="6" /> |
</Grid> |
<Grid Grid.Row="3"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button13" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD1" Click="button_Click" Content="1"/> |
CommandParameter="NUMPAD1" Click="button_Click" Content="1"/> |
</Grid> |
<Grid Grid.Column="1" Grid.Row="3"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button14" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD2" Click="button_Click" Content="2"/> |
CommandParameter="NUMPAD2" Click="button_Click" Content="2"/> |
</Grid> |
<Grid Grid.Column="2" Grid.Row="3"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button15" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD3" Click="button_Click" Content="3" /> |
CommandParameter="NUMPAD3" Click="button_Click" Content="3" /> |
</Grid> |
<Grid Grid.Column="3" Grid.Row="2" Grid.RowSpan="3"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button16" |
Command="{Binding PressAndRelease}" CommandParameter="RETURN" Click="button_Click" Content="Enter"/> |
CommandParameter="RETURN" Click="button_Click" Content="Enter"/> |
</Grid> |
<Grid Grid.ColumnSpan="2" Grid.Row="4"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button17" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="NUMPAD0" Click="button_Click" Content="0" /> |
CommandParameter="NUMPAD0" Click="button_Click" Content="0" /> |
</Grid> |
<Grid x:Name="gDecimal" Grid.Column="2" Grid.Row="4"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="button19" Background="WhiteSmoke" |
Command="{Binding PressAndRelease}" CommandParameter="DECIMAL" Click="button_Click" Content="," /> |
CommandParameter="DECIMAL" Click="button_Click" Content="," /> |
</Grid> |
<Grid Grid.ColumnSpan="3"> |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="0" > |
<!--<TextBox x:Name="textBox" HorizontalAlignment="Left" Height="49" Text="{Binding Result}" VerticalAlignment="Top" Width="212" AllowDrop="False" IsUndoEnabled="False" IsReadOnly="True"/>--> |
</Border> |
<Label Content="{Binding Result}" HorizontalContentAlignment="Right" Background="WhiteSmoke" Margin="4"/> |
<Label Content="{Binding Result}" HorizontalContentAlignment="Right" Background="WhiteSmoke" Margin="4" Visibility="Hidden"/> |
<TextBox x:Name="textBox" HorizontalAlignment="Left" Height="49" Margin="4,4,0,0" Text="{Binding Result}" VerticalAlignment="Top" Width="212" FontSize="24" MaxLines="1" KeyDown="OnKeyDown" TextChanged="OnTextChanged"/> |
|
</Grid> |
</Grid> |
<Grid Grid.Column="3" > |
<Border Style="{StaticResource buttonBorder}" Background="Black" CornerRadius="4" /> |
<Button x:Name="buttonClear" Grid.Row="0" |
Command="{Binding PressAndRelease}" CommandParameter="Clear" Click="button_Click" Content="C"/> |
CommandParameter="Clear" Click="button_Click" Content="C"/> |
<!--<Button x:Name="buttonEsc" Grid.Row="0" |
Command="{Binding PressAndRelease}" CommandParameter="ESC" Click="button_Click" Content="Esc"/>--> |
</Grid> |