phone:WebBrowser disable pan/zoom wp7?

后端 未结 4 1690
野的像风
野的像风 2020-12-22 05:29

I am using this code,

 

        
相关标签:
4条回答
  • 2020-12-22 05:54

    If you can change the HTML maybe you can add the viewport metadata: https://developer.mozilla.org/en/Mobile/Viewport_meta_tag

    I use it in my WP7 app (Stacks for Instapaper) to display web pages with specific width so the reading experience is not hampered by zooming/panning

    I use this values:

    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
    
    0 讨论(0)
  • 2020-12-22 05:59

    I think you have a better way capturing the manipulation events, if it is in WP7.5 Mango since the browser controls are completely different, which I read from this link. I have marked the important stuff.

    0 讨论(0)
  • 2020-12-22 06:00

    Set IsHitTestVisible to False, and you can no longer do interactions on the control.

    ie. <phone:WebBrowser IsHitTestVisible="False" ... />

    0 讨论(0)
  • 2020-12-22 06:03

    The webbbrowser control in Windows Phone still allows for zoom and scroll because this is done on a control "above" the actual browser component.

    This can be disabled in C# (additionally you can probably detect right/left vs up/down scroll gestures and suppress them individually)

    See this blog entry for a full description: http://www.scottlogic.co.uk/blog/colin/2011/11/suppressing-zoom-and-scroll-interactions-in-the-windows-phone-7-browser-control/

    Peter

    0 讨论(0)
提交回复
热议问题