Stylus.SetIsPressAndHoldEnabled does not work when Switch.System.Windows.Input.Stylus.EnablePointerSupport is enabled
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 6.0.1
* Windows version: 22000.376 (Though this seems to occur on all versions of Windows that Switch.System.Windows.Input.Stylus.EnablePointerSupport is supported on)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
**Actual behavior:**
Tapping and holding on a control with Stylus.IsPressAndHoldEnabled disabled while the app has Switch.System.Windows.Input.Stylus.EnablePointerSupport enabled simply results in the same behaviour as if Stylus.IsPressAndHoldEnabled was enabled (pressing and holding results in a right click rather than a normal click, also if the control is something like a button, its state does not indicate that it is currently in the pressed state). Basically, Stylus.IsPressAndHoldEnabled has no effect when Switch.System.Windows.Input.Stylus.EnablePointerSupport is on.
**Expected behavior:**
Stylus.IsPressAndHoldEnabled being set to false on a control should have the same effect as it does when Switch.System.Windows.Input.Stylus.EnablePointerSupport is disabled.
**Minimal repro:**
Create a new WPF app, call AppContext.SetSwitch("Switch.System.Windows.Input.Stylus.EnablePointerSupport", "True") in the application startup event. Then, set Stylus.IsPressAndHoldEnabled to disabled on any control, such as a button (e.g. Stylus.SetIsPressAndHoldEnabled(Button1, False)). Stylus.IsPressAndHoldEnabled will have no effect on the control.
Contributor guide
Assessment
This issue has not been assessed yet.