webbrowser触地事件的问题 [英] Problem with webbrowser touchdown event
问题描述
我正在尝试使用web浏览器控件的触摸事件,但触摸webbroweser时不会触发事件。此控件是否支持触地事件? url说它支持。
I am trying to use touch down event of a webbrowser control, but event is not fired when i touch the webbroweser. Does this control support touchdown event ? Below url says it supports.
http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx
http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx
请告诉我如何在webbrowser上启用触地得分。
Please let me know how to enable touchdown on webbrowser.
谢谢
Shiva
Shiva
推荐答案
从什么我试过这些事件不是直接在WebBrowser元素中读取的。我想因为你需要能够与WebBrowser中的不同元素(即网页本身)进行交互。
From what I tried out those events are not read directly in the WebBrowser element. I suppose because you need to be able to interact with the different elements inside the WebBrowser, i.e., the webpage itself.
此外,如果你正在开发表面而你想要注册手指触摸事件,它是PreviewTouchDown而不是TouchDown。你可以做这样的事情来测试:
Also if you're developing for surface and you want to register the finger touch event, it's PreviewTouchDown and not TouchDown. You can make something like this to test:
<Grid Background="Red" HorizontalAlignment="Center" VerticalAlignment="Center" Width="600" Height="600" PreviewTouchDown="Grid_PreviewTouchDown" MouseDown="Grid_MouseDown" TouchDown="Grid_TouchDown">
<WebBrowser Width="500" Height="500" Source="http://google.com" />
</Grid>
希望有所帮助。
这篇关于webbrowser触地事件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!