VS2008 WPF平板电脑手写笔事件未触发 [英] VS2008 WPF Tablet Stylus Events not Firing

查看:69
本文介绍了VS2008 WPF平板电脑手写笔事件未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用ShowDialog方法打开一个新的Window时,手写笔事件没有触发,这是一个问题.我有两个窗口,Window1在拖放事件中打开Window2的新实例.当Window2打开时,手写笔不适用于任何按钮,但是 鼠标将按预期工作. UI似乎挂起了手写笔事件.有人遇到过吗?

I have a problem with the stylus events not firing when I open a new Window using the ShowDialog method. I have two windows, Window1 opens a new instance of Window2 within a drag/drop event. When Window2 opens the stylus will not work for any buttons, but the mouse will work as expected. It seems that the UI gets hung up for stylus events. Has anyone encountered this?

Window1的XAML代码

XAML Code for Window1


<Window x:Class="WpfApplication1.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window1" Height="300" Width="300">
  <DockPanel>
    <ListBox>
      <ListBox.Resources>
        <Style TargetType="{x:Type Image}">
          <Setter Property="Width" Value="100"/>
          <Setter Property="Height" Value="100"/>
          <EventSetter Event="MouseLeftButtonDown" Handler="DragImage"/>
        </Style>
      </ListBox.Resources>
      <ListBoxItem>
        <Image Source="RedIndicator.png"/>
      </ListBoxItem>
      <ListBoxItem>
        <Image Source="YellowIndicator.png"/>
      </ListBoxItem>
    </ListBox>
    <Canvas x:Name="Canvas" AllowDrop="True" Background="Aqua" Drop="DropImage"/>
  </DockPanel>
</Window>

推荐答案

嗨nickyzzi,

我这里没有平板电脑.根据我的测试,如果使用鼠标,该事件将正常运行.因此,我需要让其他工程师参与线程讨论.

I don’t have tablet pc here. Based on my test, the event works fine if I use mouse. So I need to involve other engineers to the thread discussion.

此致,

张倩倩

在论坛中


这篇关于VS2008 WPF平板电脑手写笔事件未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆