WebView Magic Tricks: Zoom Levels
One question I've heard a few times in the MSDN Windows Store App forums is about how to resize the content of the WebView. In my second post of the WebView Magic Tricks series, I explain how we can manipulate the content by using CSS that is fully supported by WebView and apply it without much hassle. Source code is attached to the post for your convenience.
If you enjoyed this video, please check out all of our videos at our YouTube channel and be sure to follow us on Twitter @wsdevsol
Comments
Anonymous
May 30, 2013
Thank you for the tip. I would recommend a different tactic though. A lot of online news sites and online newspapers don't like frames and will navigate the window directly to the content to avoid any external advertising. What I recommend is sticking the webview inside of a scrollviewer. Then adjust the height and width of the webview inversely proportional to the zoom factor. That way it will still completely fill the scrollviewer. Also, align the webview to the top and left. I've put together a sample app to show you and I'll be happy to email it to you.Anonymous
June 03, 2013
The comment has been removedAnonymous
March 20, 2015
how can I set a new src to iframe?Anonymous
October 11, 2015
This zoom trick works great in Win8.1, but it does not seem to work in Win10 Universal apps. Is there a way to zoom WebView contents in Win10? Thanks!