dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

Click event is rarely raised when using touch #194

Open Jogge opened 5 years ago

Jogge commented 5 years ago

When one of the textboxes has content changed, and you uses touch to focus the other textbox, the DialogWindow will pop up. Now the problem occurs, and we have to press (touch) the close button multiple times (etc. 11 times on one of our devices) before the click event happens and the dialog closes.

TouchDown event works properly. We're also experincing this on other elements than Button, for example TextBox. It is therefore not a solution to switch to TouchDown event. Everyhing in the new window seems to be buggy.

Related links: https://stackoverflow.com/questions/53851382/wpf-click-event-is-not-raised-on-touch-screen https://stackoverflow.com/questions/28441538/touching-a-wpf-button-does-sometimes-not-invoke-the-click-handler-under-windows

stevenbrix commented 5 years ago

@Jogge can you elaborate on why using touch events is not a solution?

rladuca commented 5 years ago

@stevenbrix Touch is not first class in WPF as it is in UWP. If touch doesn't promote to mouse (and therefore click) the button will not click.

StefGuichard commented 5 years ago

I've got the same problem. In your project you can change clickEvent by Mousedown or PreviewMouseDown. On TouchScreen you will have the same problem if you use your finger. With mouse it works well. Any news or workaround ?

Jogge commented 5 years ago

@StefGuichard unfortunately we have not found any workarounds, other than using the TouchDown event... 😟

Stannieman commented 5 years ago

I seems to be related to that issue 450. At the moment you click the close button in dialog and it doesn't work you can see that it has 0 TouchesOver on MainWindow but 2 TouchesOver on DialogWindow. This is not correct as I only ever touched the screen with 1 finger at a time.

I don't know exactly how .NET handles touch internally but I feel the same part of WPF code is responsible for both cases.

pstow commented 5 years ago

I have had this issue with numerous projects over the last four years. I have been able to correct the issue by switching from a multi-touch driver to a single-touch driver on our touch screens. Unfortunately, I have not been able to find a single touch driver for Windows 10 that works yet. I may have to downgrade my latest project to Windows 7.

HartlD2 commented 5 years ago

Hello are there any workarounds or fixes of this bug available?

hunterzzzpro commented 5 years ago

This is still a huge issue, ShowDialog doesn't work well with multi-touch displays.

It does respond if I tap the Window 8-10 times then it becomes responsive. I have tried all of the focus options, almost every setting and nothing makes a difference, I have had to make my own showDialog functionality, but it needs to be shown with ShowDialog ideally.

Stannieman commented 5 years ago

@hunterzzzpro can you share how you do this? In our main app we have an abstraction around ShowDialog anyway so this kind of workaround might work better than other things we tried (which all introduced their own bugs).

pstow commented 5 years ago

I use WPF on Beckhoff touch screens and was able to get my project to work with the eGalaxTouch_5.14.0.17601 driver in single touch mode.

hunterzzzpro commented 5 years ago

@Stannieman My requirements were to have the window pop up and not allow the user to click outside of that window.

So I did the following: Used .Show() set the window.Topmost = true;
then made an event for the MainWindow to subscribe too that makes a hidden rectangle visible, but it's transparent. This stops any of the buttons from being clicked/pressed.

Very hacky which is why I need ShowDialog() fixed. Probably won't help in your case, but it's a temp fix for me (Tight deadlines!)

Stannieman commented 5 years ago

@hunterzzzpro yeah approach with overlay is actually ok for us, but Show() not blocking until dialog is closed is kind of a problem.

Actually now that I think about it, probably the fact that Show() (and thus really the main window's message loop) does not wait for the dialog to close is exactly why it works for you.

weltkante commented 5 years ago

Slightly offtopic, but here is how we are doing modal loops without ShowDialog in WinForms. It's how PropertyGrid shows its dropdown popups. No idea if it helps with this particular problem.

jgmreyes commented 5 years ago

This issue happens when Button elements are located in a user control or window along side a text box or could be with other elements.

You need to assign a touch down event along side assigning a command parameter and a command on the button element.

If the touch down event is fired, manually fire the command. Example below

            MapEntity commandParameter = (MapEntity)(((Button)sender).CommandParameter);

            var viewModel = (FindADISViewModel)DataContext;
            if (viewModel.OpenDIS.CanExecute(commandParameter))
                viewModel.OpenDIS.Execute(commandParameter);
pconetalux commented 3 years ago

Disabling the RealTimeStylus works with me. See the next article: "... As a result, to use WM_TOUCH to receive touch messages from a WPF window, you must disable the built-in stylus support in WPF ..." https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/disable-the-realtimestylus-for-wpf-applications

rladuca commented 3 years ago

Disabling the RealTimeStylus works with me. See the next article: "... As a result, to use WM_TOUCH to receive touch messages from a WPF window, you must disable the built-in stylus support in WPF ..." https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/disable-the-realtimestylus-for-wpf-applications

You should, instead, use this AppContext switch:

https://github.com/dotnet/wpf/blob/ad2c2211e18283870b5d50eccdb32c1905425951/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CoreAppContextSwitches.cs#L39

This is much cleaner and is present in .NET Framework 4.8 as well as version of .NET Core (and beyond) that support WPF. I believe it is also available in .NET Framework 4.7.2, but I don't have the history to hand right now so I don't feel comfortable stating that as fact. If you enable the switch and you try to access Tablet.TabletDevices they should be empty, even on a machine with touch/stylus devices. Then you know its working and WPF (via WISP) will not eat various touch-centric Windows messages.

anjali-wpf commented 2 years ago

@Jogge We tested this issue on a fresh machine (Win 22H2, OS build : 25232.1000 with .NET version 6.0.402 installed) and we couldn't replicate the issue. The touch event was firing with every click. You can check the attached video for the reference.

Can you confirm if you're still seeing this issue? If yes, then please let us know what version of .net and win version are you currently on.

https://user-images.githubusercontent.com/85492722/198002176-6a03c3e9-9be2-49f8-ba8a-a1d5459792d7.mov

Jogge commented 2 years ago

The bug still occurs for the following computer running the program in self-contained .net 6 application, with target framework net6.0-windows and runtime win-x86:

Processor   Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz   2.20 GHz
Installed RAM   4,00 GB (3,79 GB usable)
System type 64-bit operating system, x64-based processor
Pen and touch   Touch support with 10 touch points

Edition Windows 10 Pro
Version     21H2
Installed on    ‎14-‎10-‎2021
OS build    19044.1526
Experience  Windows Feature Experience Pack 120.2212.4170.0

It is a long time since this tablet has been windows updated. I will do that now and check if it still occurs.

https://user-images.githubusercontent.com/15981279/198024997-401ab9f5-2b0b-4229-adc6-3f3daf2ecca8.mp4

Touch.deps.json ```json { "runtimeTarget": { "name": ".NETCoreApp,Version=v6.0/win-x86", "signature": "" }, "compilationOptions": {}, "targets": { ".NETCoreApp,Version=v6.0": {}, ".NETCoreApp,Version=v6.0/win-x86": { "Touch/1.0.0": { "dependencies": { "runtimepack.Microsoft.NETCore.App.Runtime.win-x86": "6.0.8", "runtimepack.Microsoft.WindowsDesktop.App.Runtime.win-x86": "6.0.8" }, "runtime": { "Touch.dll": {} } }, "runtimepack.Microsoft.NETCore.App.Runtime.win-x86/6.0.8": { "runtime": { "Microsoft.CSharp.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "Microsoft.VisualBasic.Core.dll": { "assemblyVersion": "11.0.0.0", "fileVersion": "11.100.822.36306" }, "Microsoft.Win32.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "Microsoft.Win32.Registry.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.AppContext.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Buffers.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Collections.Concurrent.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Collections.Immutable.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Collections.NonGeneric.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Collections.Specialized.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Collections.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.Annotations.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.DataAnnotations.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.EventBasedAsync.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.TypeConverter.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ComponentModel.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Configuration.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Console.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Core.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Data.Common.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Data.DataSetExtensions.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Data.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.Contracts.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.Debug.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.DiagnosticSource.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.FileVersionInfo.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.Process.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.StackTrace.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.TextWriterTraceListener.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.Tools.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.TraceSource.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.Tracing.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Drawing.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Dynamic.Runtime.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Formats.Asn1.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Globalization.Calendars.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Globalization.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Globalization.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Compression.Brotli.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Compression.FileSystem.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Compression.ZipFile.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Compression.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.FileSystem.AccessControl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.FileSystem.DriveInfo.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.FileSystem.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.FileSystem.Watcher.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.FileSystem.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.IsolatedStorage.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.MemoryMappedFiles.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Pipes.AccessControl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.Pipes.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.UnmanagedMemoryStream.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.IO.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Linq.Expressions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Linq.Parallel.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Linq.Queryable.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Linq.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Memory.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Http.Json.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Http.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.HttpListener.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Mail.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.NameResolution.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.NetworkInformation.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Ping.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Quic.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Requests.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Security.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.ServicePoint.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.Sockets.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.WebClient.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.WebHeaderCollection.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.WebProxy.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.WebSockets.Client.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.WebSockets.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Net.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Numerics.Vectors.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Numerics.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ObjectModel.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Private.CoreLib.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Private.DataContractSerialization.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Private.Uri.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Private.Xml.Linq.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Private.Xml.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.DispatchProxy.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Emit.ILGeneration.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Emit.Lightweight.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Emit.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Metadata.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.TypeExtensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Reflection.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Resources.Reader.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Resources.ResourceManager.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Resources.Writer.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.CompilerServices.Unsafe.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.CompilerServices.VisualC.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Handles.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.InteropServices.RuntimeInformation.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.InteropServices.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Intrinsics.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Loader.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Numerics.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Serialization.Formatters.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Serialization.Json.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Serialization.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Serialization.Xml.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.Serialization.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Runtime.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.AccessControl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Claims.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Algorithms.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Cng.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Csp.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Encoding.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.OpenSsl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Primitives.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.X509Certificates.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Principal.Windows.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Principal.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.SecureString.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ServiceModel.Web.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ServiceProcess.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.Encoding.CodePages.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.Encoding.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.Encoding.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.Encodings.Web.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.Json.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Text.RegularExpressions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Channels.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Overlapped.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Tasks.Dataflow.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Tasks.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Tasks.Parallel.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Tasks.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Thread.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.ThreadPool.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.Timer.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Transactions.Local.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Transactions.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.ValueTuple.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Web.HttpUtility.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Web.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Windows.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.Linq.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.ReaderWriter.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.Serialization.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.XDocument.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.XPath.XDocument.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.XPath.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.XmlDocument.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.XmlSerializer.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Xml.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "mscorlib.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "netstandard.dll": { "assemblyVersion": "2.1.0.0", "fileVersion": "6.0.822.36306" } }, "native": { "API-MS-Win-core-xstate-l2-1-0.dll": { "fileVersion": "10.0.22000.194" }, "Microsoft.DiaSymReader.Native.x86.dll": { "fileVersion": "14.28.29715.1" }, "System.IO.Compression.Native.dll": { "fileVersion": "42.42.42.42424" }, "api-ms-win-core-console-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-console-l1-2-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-datetime-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-debug-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-errorhandling-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-fibers-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-file-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-file-l1-2-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-file-l2-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-handle-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-heap-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-interlocked-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-libraryloader-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-localization-l1-2-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-memory-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-namedpipe-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-processenvironment-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-processthreads-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-processthreads-l1-1-1.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-profile-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-rtlsupport-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-string-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-synch-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-synch-l1-2-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-sysinfo-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-timezone-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-core-util-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-conio-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-convert-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-environment-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-filesystem-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-heap-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-locale-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-math-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-multibyte-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-private-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-process-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-runtime-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-stdio-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-string-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-time-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "api-ms-win-crt-utility-l1-1-0.dll": { "fileVersion": "10.0.22000.194" }, "clretwrc.dll": { "fileVersion": "6.0.822.36306" }, "clrjit.dll": { "fileVersion": "6.0.822.36306" }, "coreclr.dll": { "fileVersion": "6.0.822.36306" }, "createdump.exe": { "fileVersion": "6.0.822.36306" }, "dbgshim.dll": { "fileVersion": "6.0.822.36306" }, "hostfxr.dll": { "fileVersion": "6.0.822.36306" }, "hostpolicy.dll": { "fileVersion": "6.0.822.36306" }, "mscordaccore.dll": { "fileVersion": "6.0.822.36306" }, "mscordaccore_x86_x86_6.0.822.36306.dll": { "fileVersion": "6.0.822.36306" }, "mscordbi.dll": { "fileVersion": "6.0.822.36306" }, "mscorrc.dll": { "fileVersion": "6.0.822.36306" }, "msquic.dll": { "fileVersion": "1.7.0.0" }, "ucrtbase.dll": { "fileVersion": "10.0.22000.194" } } }, "runtimepack.Microsoft.WindowsDesktop.App.Runtime.win-x86/6.0.8": { "runtime": { "Accessibility.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36804" }, "DirectWriteForwarder.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "Microsoft.VisualBasic.Forms.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "Microsoft.VisualBasic.dll": { "assemblyVersion": "10.1.0.0", "fileVersion": "6.0.822.36804" }, "Microsoft.Win32.Registry.AccessControl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "Microsoft.Win32.SystemEvents.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "PresentationCore.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework-SystemCore.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework-SystemData.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework-SystemDrawing.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework-SystemXml.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework-SystemXmlLinq.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.Aero.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.Aero2.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.AeroLite.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.Classic.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.Luna.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.Royale.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationFramework.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "PresentationUI.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "ReachFramework.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "System.CodeDom.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Configuration.ConfigurationManager.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Design.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Diagnostics.EventLog.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Diagnostics.PerformanceCounter.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.DirectoryServices.dll": { "assemblyVersion": "4.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Drawing.Common.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Drawing.Design.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Drawing.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.IO.Packaging.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Printing.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "System.Resources.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Pkcs.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.ProtectedData.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Cryptography.Xml.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Security.Permissions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Threading.AccessControl.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Windows.Controls.Ribbon.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "System.Windows.Extensions.dll": { "assemblyVersion": "6.0.0.0", "fileVersion": "6.0.822.36306" }, "System.Windows.Forms.Design.Editors.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Windows.Forms.Design.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Windows.Forms.Primitives.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Windows.Forms.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36804" }, "System.Windows.Input.Manipulations.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "System.Windows.Presentation.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "System.Xaml.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "UIAutomationClient.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "UIAutomationClientSideProviders.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "UIAutomationProvider.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "UIAutomationTypes.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "WindowsBase.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" }, "WindowsFormsIntegration.dll": { "assemblyVersion": "6.0.2.0", "fileVersion": "6.0.822.36807" } }, "native": { "D3DCompiler_47_cor3.dll": { "fileVersion": "10.0.22000.194" }, "PenImc_cor3.dll": { "fileVersion": "6.0.822.36807" }, "PresentationNative_cor3.dll": { "fileVersion": "6.0.22.31404" }, "vcruntime140_cor3.dll": { "fileVersion": "14.32.31326.0" }, "wpfgfx_cor3.dll": { "fileVersion": "6.0.822.36807" } } } } }, "libraries": { "Touch/1.0.0": { "type": "project", "serviceable": false, "sha512": "" }, "runtimepack.Microsoft.NETCore.App.Runtime.win-x86/6.0.8": { "type": "runtimepack", "serviceable": false, "sha512": "" }, "runtimepack.Microsoft.WindowsDesktop.App.Runtime.win-x86/6.0.8": { "type": "runtimepack", "serviceable": false, "sha512": "" } }, "runtimes": { "win-x86": [ "win", "any", "base" ], "win-x86-aot": [ "win-aot", "win-x86", "win", "aot", "any", "base" ], "win10-x86": [ "win10", "win81-x86", "win81", "win8-x86", "win8", "win7-x86", "win7", "win-x86", "win", "any", "base" ], "win10-x86-aot": [ "win10-aot", "win10-x86", "win10", "win81-x86-aot", "win81-aot", "win81-x86", "win81", "win8-x86-aot", "win8-aot", "win8-x86", "win8", "win7-x86-aot", "win7-aot", "win7-x86", "win7", "win-x86-aot", "win-aot", "win-x86", "win", "aot", "any", "base" ], "win7-x86": [ "win7", "win-x86", "win", "any", "base" ], "win7-x86-aot": [ "win7-aot", "win7-x86", "win7", "win-x86-aot", "win-aot", "win-x86", "win", "aot", "any", "base" ], "win8-x86": [ "win8", "win7-x86", "win7", "win-x86", "win", "any", "base" ], "win8-x86-aot": [ "win8-aot", "win8-x86", "win8", "win7-x86-aot", "win7-aot", "win7-x86", "win7", "win-x86-aot", "win-aot", "win-x86", "win", "aot", "any", "base" ], "win81-x86": [ "win81", "win8-x86", "win8", "win7-x86", "win7", "win-x86", "win", "any", "base" ], "win81-x86-aot": [ "win81-aot", "win81-x86", "win81", "win8-x86-aot", "win8-aot", "win8-x86", "win8", "win7-x86-aot", "win7-aot", "win7-x86", "win7", "win-x86-aot", "win-aot", "win-x86", "win", "aot", "any", "base" ] } } ```
Jogge commented 2 years ago

@anjalisheel-wpf After updating windows with the latest updates the issue still occur with the same .net 6 self-contained application.

Heres the system specifications after windows updates:

Processor   Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz   2.20 GHz
Installed RAM   4,00 GB (3,79 GB usable)
System type 64-bit operating system, x64-based processor
Pen and touch   Touch support with 10 touch points

Edition     Windows 10 Pro
Version     22H2
Installed on    ‎14-‎10-‎2021
OS build    19045.2193
Experience  Windows Feature Experience Pack 120.2212.4180.0
Stannieman commented 2 years ago

@anjalisheel-wpf I believe it does not occur on Win 11 for some reason, on 10 and older you should be able to reproduce. I don't know why cause it looks like all this touch to mouse promotion is done in WPF and not by Windows.

caomfan commented 5 months ago

@anjalisheel-wpf I believe it does not occur on Win 11 for some reason, on 10 and older you should be able to reproduce. I don't know why cause it looks like all this touch to mouse promotion is done in WPF and not by Windows.

Unfortunately this problem still exists on win11 image

https://github.com/dotnet/wpf/assets/30285397/6b688f1f-b0b7-4e1c-8374-85e52b50ebf0

But it is normal to open the modal window using a button