WebBrowser 控件 - 进入并保持离线模式 [英] WebBrowser control - enter and keep offline mode

查看:32
本文介绍了WebBrowser 控件 - 进入并保持离线模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想手动将 HTML 加载到 Web 浏览器控件中,并确保它不会产生任何互联网流量,因此请尽其所能显示内容.

I would like to manually load HTML into a web browser control and make sure it does not create any internet traffic, so just show the content to the best of its abilities.

如 MSDN 中所述,WebBrowser.IsOffline 是只读的.

As specified in MSDN, WebBrowser.IsOffline is read-only.

有没有办法设置它(不使用反射技巧)?

Is there a way to set it (without using reflection hacks)?

或者我必须为此使用第 3 方控件:

Or do I have to resort to using a 3rd party control for this:

推荐答案

您可以设置 WebBrowser.AllowNavigationFalse.

控件在其初始页面加载后是否可以导航到另一个页面.

Whether the control can navigate to another page after its initial page has been loaded.

这篇关于WebBrowser 控件 - 进入并保持离线模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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