在WPF WebBrowser中获取URL [英] Obtaining URL in WPF WebBrowser

查看:88
本文介绍了在WPF WebBrowser中获取URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在WPF Web浏览器中工作,但似乎无法从中获取URI.(与具有WebBrowser.Url属性的WinForms版本不同).是否有任何属性可以将其保存为Uri或String?

I have been working in WPF web browsers lately but I can't seem to be able to get URIs out of it. (Unlike the WinForms version which has the WebBrowser.Url property). Is there any property that holds it either it's as Uri or String?

推荐答案

您必须引用 WebBrowser.Source 属性,该属性保存与当前关联的 Uri 对象看法.看看 Microsoft文档.

You have to refer to the WebBrowser.Source property that holds the Uri object associated to the current view. Take a look to Microsoft Documentation.

这篇关于在WPF WebBrowser中获取URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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