Home / WPF / HMI Controls / Keypad for WPF applications with touch-screen

Keypad for WPF applications with touch-screen

This is a keypad that i often use in my applications. You can download the source code and a sample application from here:http://www.mesta-automation.com/Downloads/keypad.rar

The original graphic and concepts has been taken from here: http://wosk.codeplex.com/ (check for the latest source code) and this control comes with the original license attached (it’s a free control that you can redistribute).

To use this keypad you should add the library as reference, create a textbox and use the event PreviewMouseUp to launch the external window. Usually i use the event “TextChanged” with validation on received data to manage the input when the user press Enter.

The code behind this keypad is totally different than the one provided with the original source code, because i needed a simpler control  and the possibility to insert and edit the value inside the keypad, before updating target textbox.

Last but not least, to avoid the blurry effect when using DropShadowEffect i used this code, that include the button in a grid and put behind it a border:

<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" />
</Grid>
Share Button

4 comments

  1. Excellent. Thank you.

  2. Simple but I like

  3. many thank you~ . it’s very good!!!

Leave a Reply