我如何在 wp7 中滚动 Web 浏览器控件 [英] How i Scroll web browser control in wp7

查看:24
本文介绍了我如何在 wp7 中滚动 Web 浏览器控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想滑动位于枢轴项上的 webbrowser Control,每个枢轴项有一个网页控件.我想用网页浏览器控件刷卡.但我不知道.但是在我的项目中需要刷卡.如果是,有什么方法可以做到这一点,然后请给我发送示例代码.

i want to swipe webbrowser Control which is on pivot item ,each pivot item has a web control .i want to swipe with web browser control . but i don't have any idea.but swiping is necessary in my project .is there any method to doing this if yes then please send me sample code for this ..

推荐答案

如果您希望在 Pivot 中显示某些不同的 HTML 部分,则这是一个绑定.如果您的目标是 WP7 Mango,您可能可以将 HTML 转换为 RTF,然后使用 RichTextBox 而不是 WebBrowser.但是,如果您的 HTML 相当复杂,这可能不适合您.

This is a bind if you have some different sections of HTML you want to display in a Pivot. If you are targetting WP7 Mango it might be possible for you to convert your HTML to RTF and then use a RichTextBox instead of a WebBrowser. However if your HTML is fairly complex, this probably isn't going to work for you.

或者,您可以将您的 WebBrowser 放在一个透视项中,并在其上方按 Z 顺序放置一个透明的 Rectangle.确保 Rectangle 吞下任何手势并且不会将它们传递给 WebBrowser 控件 - 这样您就可以在 WebBrowser 上左右滑动以移动枢轴.

Alternatively you could place your WebBrowser in a pivot item with a transparent Rectangle above it in the Z-order. Make sure that Rectangle swallows any gestures and doesn't pass them through to the WebBrowser control - that way you will be able to swipe left and right on the WebBrowser to get the pivot to move.

接下来,您可以使用此透明矩形上的 GestureService 来识别垂直平移/滑动和点击,以将您带到 WebBrowser 内容的完整页面视图.在此完整页面视图中,您将拥有一个完全交互式的 WebBrowser 控件.

Next you can use the GestureService on this transparent rectangle to recognize vertical pans/swipes and taps to take you to a full page view of your WebBrowser content. In this full page view you would have a fully interactive WebBrowser control.

这篇关于我如何在 wp7 中滚动 Web 浏览器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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