As i previously did with Keypad, i rewrote the code of the for a WPF touch keyboard based on Wosk project on Codeplex.
This keyboard both support upper and lower case letter, it’s completely sizable and it’s good-looking.
I packed this together with keypad for convenience, and you can download the sample application + source code on GitHub.
how i can use it in a UserControl
With a minor modification to the constructor of both the Keypad and VirtualKeyboard classes it is possible to preserve the value of the TextBox between calls. In other words, touching the bound TextBox would pop-up the KeyPad or VirtualKeyboard with the current TextBox value for Modification/Edit as opposed to the current behavior where the result is set to an empty string requiring the operator re-enter the complete text.
At the end of each respective constructor, change…
Result = “”;
Result = owner.Text;
VirtualKeyboard.xaml.cs (line 69) and Keypad.xaml.cs (line 50) as referenced by the above linked example source.
A further enhancement to the Keypad/VirtualKeyboard classes for “preserved edit” would allow for cursor control over the insert/delete position within the string allowing edits mid-string. Though cursor/caret management is beyond the scope of this particular reply.
can u provide me the code for usercontrol how it can be used between application
I updated the article, sources are here: https://github.com/mesta1/WPF-on-screen-keyboard-and-keypad
is there an easy way to target the keyboard at all textboxes rather than individual textboxes in behind code. thanks Chuck R
You can use a behavior: https://blogs.msdn.microsoft.com/argumentnullexceptionblogpost/2013/04/12/a-simple-selectall-behavior-for-textboxes/
I know it 2018 now am maybe you stop maintain this project but can you say how to used this code with user control in wpf
Not sure if anyone still responds to messages here but how would I go about sending keypresses to the control (like a textbox) as they occur rather than having to hit “return”?
If I have to use in Page instead of window how do I do it, I am having error ” Argument 2: cannot convert from ‘GEA_HMI.View.Page1’ to ‘System.Windows.Window'”
Can Somebody help in for the problem ?