2

I have developed an application to run on a Samsung Series 7 tablet. This application was developed using WPF, .NET 4.5, and C#.

My problem is that sometimes a button does not receive input the first time it is tapped. For example, Window1 has a OpenWindow2Button on it that opens Window2. Close Window2 and then try to push DoSomethingElseButton. The first time I tap the button, nothing happens. The second time the button works like expected. The same problem also occurs when I tap a DisplayMediaElement that is on Window1.

An interesting fact is that if I use a stylus or mouse, the problem is non-existent.

My guess is that the Window or DisplayMediaElement does not have focus to receive a tap input. (But then why does it have focus to receive a stylus or mouse input?) Is this a feature or a bug? Is it possible to receive touch input the first time a button is tapped?

Robert
  • 400
  • 8
  • 23

1 Answers1

0

Maybe sometimes it does not recognize gesture as 'tap' but as 'drag' (or any other gesture type)? I think i had a problem with it some time ago.

Loki
  • 615
  • 9
  • 12
  • This answer was enough to point me in the direction. My app has many buttons, but there are some crucial buttons that need to respond the first time they are tapped. I hooked up the TouchDown event to these buttons as well as leaving the MouseDown event hooked up. TouchDown fires every time with no problems. Anybody else with this problem would need to be sure that their code would work if **both** the events were fired. – Robert May 08 '13 at 00:19