WPF should not show the Touch Keyboard when focus is set with mouse or programatically to align with default Windows Behavior
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
.NET Core Version: 4.7.1+
Windows version: (winver): RS1+
Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
**Problem description:**
WPF uses direct calls to InputPane.TryShow when a control get's focus and implements UIA TextPattern
https://github.com/dotnet/wpf/blob/8c7ab1592b6c70e732106aeabf58f215d4b71c22/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Interop/TipTsfHelper.cs
We should track how the control got focus and only show the Touch Keyboard if focus was initiated from touch.
Using the Pointer stack is one way to achieve this, by letting Windows do the Focus tracking.
AppContextSwitchOverrides value="Switch.System.Windows.Input.Stylus.EnablePointerSupport=true"
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/mitigation-pointer-based-touch-and-stylus-support
But the legacy ITablet stack should also have the same behavior.
Contributor guide
Assessment
This issue has not been assessed yet.