I have a WPF application with some content wrapped in a scrollviewer. I also have a custom dialogbox, which basically is a light customized Window I call ShowDialog() upon. I can use this just fine on both PC and Tablet.

But now I´ve added the PanningMode attribute to the scrollviewer, so the Tablet users can scroll/swipe with their finger, and now the problem occurs: when I use my dialogbox it shows up, but it seems like it doesent have focus. Because the first time I click on a button in the dialogbox, nothing happens. I have to click twice before the button click is registered.

If I remove the panningmode attribute on the scrollviewer, the problem is gone.

This is only a problem on the Tablet, not on the PC.

Any clues?

有帮助吗?

解决方案

I found the problem. I was triggering the dialogbox in mousedown on an image. Tried several events, but the StylusUp did the trick.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top