WebBrowser.Source 属性  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 Uri 中承载的当前文档的 WebBrowser。
public:
 property Uri ^ Source { Uri ^ get(); void set(Uri ^ value); };
	public Uri Source { [System.Security.SecurityCritical] get; set; }
	public Uri Source { get; set; }
	[<get: System.Security.SecurityCritical>]
member this.Source : Uri with get, set
	member this.Source : Uri with get, set
	Public Property Source As Uri
	属性值
当前 Uri HTML 文档。
- 属性
 
例外
WebBrowser 实例不再有效。
未能检索到对基础本机 WebBrowser 的引用。
从以不完全可信状态运行的应用程序导航到不位于源站点的 Uri。
示例
以下示例演示如何 WebBrowser 配置以仅使用标记导航到 HTML 文档。
<!-- Web Browser Control that hosts a web page. -->  
<WebBrowser x:Name="webBrowser" Source="http://msdn.com"   
  Width="600" Height="600"  />  
	注解
Setting the source property causes WebBrowser to navigate to the document specified by the Uri. Uri null如果是,则会在“about:blank”)  (显示空白文档。