We are happy to inform you that our developers have fixed this issue. Here is how the touch keyboard support can be turned on Windows 8/8.1:
C#TouchKeyboardSupport.EnableTouchKeyboard = true;
TouchKeyboardSupport.EnableFocusTracking();
On Window 10, you can use the following options:
- Turn on the Tablet Mode - in this case, the keyboard will appear automatically.
- To enable displaying the keyboard in non-tabled mode, turn on the “Automatically show the touch keyboard in windowed apps…” option.
Any update here?
I am afraid this issue is not fixed yet. Our initial idea to use the TouchKeyboardSupport helper class from our WinForms demos didn't prove to be useful (that helper does not work for WPF), so we will need to create a helper for our editors. The main problem here is that not all text fields exist in the visual tree at the application startup; for example, text fields in DXGrid are created only when a cell is focused.
In the meantime, I'd like to note that instead of displaying the keyboard automatically, you can show the Windows Taskbar so that a user can show the keyboard manually. For this, remove the DeviceDetector.IsTablet property check from the MainWindow class constructor.
Thxn for the feedback Ivan,
Real disappointment here… we really need this,
this hybrid stuff is nothing more then bigger buttons and bigger fields without touch support… surely not wordy being called hybrid,
Hi Michael,
We agree with you that the current implementation makes the demo unusable on pure touch devices. We are working on this issue.
In the meantime, if you face problems using the workarounds we discussed at T262026, drop me a line.
Ivan,
Did you get it to work? if so please post the sample
Hello Michael,
I've modified the project of our HybridApp demo by using the approach from the following thread: Automatic Touch Keyboard for TextBoxes in WPF Applications on Windows 8+. Take a moment to review the attached project. Now the on-screen keyboard is shown for editors in this application.
In addition, note that this approach will not work for GridControl. We've discussed this behavior in the following thread: WPF TextEdit EditValue does not hold it's value when set in code behind.
Thanks,
Andrey
Andrey,
This doesn't work here…when i go to products and edit one no keyboard appears…
this sample works https://github.com/brianlagunas/WpfTouchKeyboard
however implemented in the hybrid app … it does nothing at all…
it becoming urgent right now so really need a working solution soon
Hello Michael,
Would you please clarify whether you do not see the on-screen keyboard when you run the modified demo project attached to my previous comment? I've tested it again on our side and the on-screen keyboard was correctly shown when I activated any editor, including those that are used to edit Product information. I've attached a screencast to illustrate how this works on my machine. Did I miss something important?
Thanks,
Andrey
I do not have the same behaviour as you do :-S
Hello Michael,
This issue may be related to a specific Windows version. We've tested this project on Windows 8.1 (you specified it in T262026). Would you please clarify what version you are using on the problematic touch device?
Thanks,
Andrey
8.1 Pro (6.3 bld 9600)
How about windows 10? the api is not supported in windows 10.
Hi Michael,
I have tested this approach in Windows 10 and confirm that it does not work there. This is the reason why this functionality is not implemented on our side so far - there is no guarantee that an approach that works in one version will work on another.
Regarding the issue on Windows 8.1, the sample Andrey attached works properly on my side, and I have the same version as you - 6.3, build version is 9600. Honestly, it's difficult to say why this approach does not work on your side. Considering the fact that the original WpfTouchKeyboard works properly on your side, the issue may be related to a specific DevExpress version. Would you please check what build of our controls you are using at the moment? You can check it in the Debug->Windows->Modules window.
Just in case, how are you focusing editors to reproduce the issue? Are you using the touch screen or the mouse?
I have also noticed that the keyboard is sometimes not displayed immediately - I have to tap an editor two or three times to invoke it. Please check if you have a similar issue on your side.
As a possible alternative, try invoking the keyboard manually, for example, using Process.Start:
Process.Start("osk.exe")
A similar approach is described in the Adding Touch Keyboard Support to a WPF Desktop Application article.
To invoke a keyboard when our editor is focused, you can use a handler like this one:
public MainWindow() { InitializeComponent(); //... PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(MainWindow_PreviewGotKeyboardFocus); } void MainWindow_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { TextEdit editor = LayoutTreeHelper.GetVisualParents((DependencyObject)e.OriginalSource).Where(x => x is TextEdit).Cast<TextEdit>().FirstOrDefault(); if (editor != null) _touchKeyboardProvider.ShowTouchKeyboard(); }
Ivan,
I will look into it thnx,
I did find some interesting info about issues I experienced.
Another technique for showing and hiding the touch keyboard in a desktop application is described in detail at http://brianlagunas.com/showing-windows-8-touch-keyboard-wpf/, but at the time this article was written there was a bug in .NET Framework 4.5.2 that causes applications that use this technique to stop responding to the user. Microsoft has released hotfix 3026376 (https://support.microsoft.com/en-us/kb/3026376) to address this issue, but the hotfix must be downloaded directly from Microsoft as it is not yet available in Windows Update.
at some point my application stopped responding… this is probably the moment everything was implemented correctly for the keyboard
It looks like you are right - the sample Andrey attached does not work on our machine with .NET Framework 4.5.2 installed (by the way, his sample uses the approach described in http://brianlagunas.com/showing-windows-8-touch-keyboard-wpf/). Moreover, installing .NET Framework 4.6 fixed the issue and the project started properly. Try installing that version on your side (you can download it here) and let me know if this helps.