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:https://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" />


  1. Excellent. Thank you.

  2. Simple but I like

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

  4. Thanks a lot, this really save me a lot of time

  5. If i may ask, what is PLC?

    • A plc is a real time controller used in industrial audomation. Usually they are connected to computer or panel-pc that runs a user interface to control the machinery.

Leave a Reply

Your email address will not be published.