CefSharp icon indicating copy to clipboard operation
CefSharp copied to clipboard

WPF WindowsFormsHost Touch Screen not working

Open Jovan-Cheng opened this issue 10 years ago • 23 comments

  • What version of the product are you using?
    • 1、Nuget 53
    • 2、build from a branch 49.0.2623
  • What architecture x86 or x64?
    • x64
  • On what operating system?
    • Win7
  • Are you using WinForms, WPF or OffScreen?
    • WPF
  • What steps will reproduce the problem?
    • Reference :CefSharp.dll CefSharp.Core.dll CefSharp.Winform.dll
    • Use 'WindowsFormsHost' control in my wpf program
    • Create 'ChromiumWebBrowser' and add it to 'WindowsFormsHost'
    • After running, you can display the page, but no Touch effect
  • What is the expected output? What do you see instead?
    • Can touch scroll and pinch

Jovan-Cheng avatar Oct 14 '16 06:10 Jovan-Cheng

@ccnucheng You are a god amongst men. Great job discovering the fix, and amazing community dedication for sharing it in such detail.

talbotmcinnis avatar Apr 25 '17 15:04 talbotmcinnis

Maybe you can use the WPF control. It fix in https://github.com/cefsharp/CefSharp/pull/2745

lindexi avatar Jun 04 '19 08:06 lindexi

I found another way to solve this problem. Just disbale Chrome Legacy Window with disable-legacy-window.

Windows 7 won't send WM_TOUCH messages to the window when it's a child of a WPF window. So touch won't work. Its window style may be part of the reason. But there's no document about this.

The effect of disabling this window is here.

In some scenarios, I think this solution is better than disabling RealTimeStylus and use WmTouchDevice.

kkwpsv avatar Feb 01 '21 04:02 kkwpsv