Asked by:
WPF Touch Bug?

Question
-
I have a very strange problem with WPF 4 and touch. Essentially, touch stops working if the user touches the screen in a particular way. It is extremely easy to reproduce (at least on my system). Here are the instructions.
I create a new WPF Application. Add two Windows to the project. In the main Window, create a large button (make it large enough that you can comfortably fit two fingers within the bounds of the button). Handle the buttonclick event to create a new window and call show dialog on the second window, for example:
Dim newWindow as SomeWindow newWindow.Owner = Me newWindow.ShowDialog
In your second window, you will probably want to add a button that calls Me.Close, so that you can run through a few tests.
Now, to produce the bug, perform these steps:
- Touch button with finger (a). Do not let go.
- Touch button with finger (b). Do not let go.
- Let go of finger (a).
- Let go of finger (b).
If you perform these steps, you will not be able to use touch on the dialog that was shown. The only way to regain the touch is to touch two fingers to the screen simultaneously.
Oddly enough, if you were to reverse steps 3 & 4, touch would not stop working. For example, the following works perfectly fine:
- Touch button with finger (a). Do not let go.
- Touch button with finger (b). Do not let go.
- Let go of finger (b).
- Let go of finger (a).
Anyone have any suggestions to prevent this. Obviously this will be a rare occurance however if the user is playing around, they can emulate a frozen system.
Thanks in advance for any help you can provide.
Visit my blog at: http://blog.nicktown.infoFriday, October 1, 2010 8:34 PM
All replies
-
Hello Nicholas,
Can you tell me your system configuration? What hardware do you have? OS version? Touch related device provider & driver version?
Thanks,
Jie
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
The All-In-One Code Framework Project
My Blog (in Simplified Chinese)Monday, October 4, 2010 4:55 AM -
Nicholas,
I can reproduce this. I believe it is a bug. I think that the problem is that the second touch (b) is still captured on the first dialog when the second dialog is opened, so the touches on the button don't get interpreted as mouse clicks correctly. Interestingly, TouchUp and TouchDown events do fire correctly for the button on the second page. I don't see a good workaround for this. Please file a Connect bug on the issue and/or contact CSS if you need further support.
Thanks,
Keith Fink
Microsoft Communities SupportWednesday, October 20, 2010 2:58 AM -
Thanks very much, this issue is posted on Connect.
https://connect.microsoft.com/VisualStudio/feedback/details/619521/wpf-touch-bug
Visit my blog at: http://blog.nicktown.info
Friday, November 5, 2010 3:09 PM -
Hi ,
Iam also facing the same issue, Any Update like Fix for this issue is avialable in any of the patches for .NetFramework 4.0.
Any Workaround for this issue available?Thanks
Wednesday, June 6, 2012 2:00 AM -
Hello,
I have also a problem with WPF touch which could be from the same source.
I capture every touch events to produce a zoom with two fingers. But a freeze occure and the zoom distorted.
Like krish1469 I could be interested if an update is avalaible.
Thanks
Wednesday, July 4, 2012 10:59 AM -
Dear,
The problem is still present, we can reproduce it easily under Windows 10 with framework 4.5, 4.6,...
I opened a StackOverflow question for this exact problem:
http://stackoverflow.com/questions/39300042/wpf-with-touchscreen-listbox-opens-a-modal-window-doesnt-respondAny help would be great, thank you.
Jean-claudeThursday, September 8, 2016 7:42 AM