2

I've created a new WPF application in Visual Studio (.Net 4.5) and just added a Slider to the MainWindow:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="SliderTest.MainWindow"
        Title="MainWindow">

    <StackPanel>
        <Slider />
    </StackPanel>
</Window>

If I use a Wacom board with Windows Ink enabled and try to drag the thumb, the thumb will be dragged only after a certain noticeable threshold (say 50px).

If Windows Ink is disabled (in the Wacom properties), the thumb is moved immediately as expected.

This problem has been reported also here and here.

This issue has apparently been a problem for many Wacom users, but for me it's not an option to disable Ink.

My understanding is that Slider (and Thumb) don't handle stylus events directly, but instead "wait" for them to be routed and bubbled and followed by mouse events see images in this blog post to see the concept illustrated.

Any idea on how to fix the Slider behavior with Ink enabled?

4

1 回答 1

1

我找不到合适的修复方法Slider,所以我决定构建自己的自定义滑块。

StylusDevice在其中,我分别处理鼠标和触控笔事件,通过检查 in 是否为 null来区分来自鼠标的鼠标事件和来自触控笔的事件MouseEventArgs

于 2015-02-26T16:01:17.620 回答