Prevent scrolling in IE on Windows Phone 7

Is there a way to prevent the user from scrolling the contents of the WebBrowser control in a Windows Phone 7 application, but still allows them to interact with the content (click buttons, checkboxes, etc.).

thank

+3
source share
3 answers

Speaking to the IE team at Microsoft, this is not possible.

-4
source

Perhaps you can do the following:

  • Find an element Borderin WebBrowserthat captures touch events and forwards them to the original browser control.
  • Detect scroll interaction and undo these events.

I created a simple utility class that does this and writes about it here:

http://www.scottlogic.co.uk/blog/colin/2011/11/suppressing-zoom-and-scroll-interactions-in-the-windows-phone-7-browser-control/

, :

var browserHelper = new WebBrowserHelper(webBrowser);
browserHelper.ScrollEnabled= false;
+4

If you use meta tags to fix scaling ( <meta name="viewport" content="user-scalable=no" /> ), then you can probably use javascript to fix the scroll position, but in general I suspect this will not look very good.

Can you tell us a little more about what effect you are looking for? for example, if you are trying to use the scroll position to control visible content, you might be better off using javascript to dynamically select which elements will be visible instead - for example. using jquery to show / hide content.

0
source

Source: https://habr.com/ru/post/1795350/


All Articles