简体   繁体   English

如何在Windows Phone 8 App中调整Web浏览器的大小

[英]How do resize a Webbrowser in Windows Phone 8 App

I just try to simulate a resizing event of a webbrowser. 我只是尝试模拟Web浏览器的大小调整事件。 It's because some user who are older and are not able to read that good see the conten in a bigger size. 这是因为某些年龄较大且无法阅读该商品的用户会看到较大的内容。 Following a simple version of the code: 下面是一个简单的代码版本:

<Viewbox x:Name="BrowserView" Stretch="None" >
   <phone:WebBrowser Source="www.google.ch" x:Name="Minibrowser" IsScriptEnabled="True" height="644" Width="462"  >

            </phone:WebBrowser>
</Viewbox>
  <Button  Content="Resize" Click="Resize" />

Xaml.Code Xaml代码

And in the underlying code file a method which just resizes the webbrowser: 在基础代码文件中,有一个方法只是调整了网络浏览器的大小:

private void Resize(object sender, RoutedEventArgs e)
{
     Minibrowser.Width = 800;
     Minibrowser.Height = 1400;}

What happens is that the browser is resized. 发生的情况是浏览器已调整大小。 However it's not possible to scroll over the whole content because the webbrowser size is now bigger than the viewbox and screen as well. 但是,不可能滚动整个内容,因为Web浏览器的大小现在也大于视图框和屏幕。

Thanks a lot for help and I'm open to listen to other solutions 非常感谢您的帮助,我愿意听其他解决方案

Have a look at this post about managing the browser-viewport and WP7 WebBrowser control zoom . 看一下有关管理浏览器视口WP7 WebBrowser控件zoom的帖子。

Plus, you could also look for "accessibility"... 另外,您还可以寻找“可访问性” ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM