问题描述
大家好,
我正在编写一个小的WPF应用程序,其中使用了Web浏览器控件.
我正在从db中获取一些段落,并通过使用webbrowser.NavigateTostring()方法将该段落放入broser控件中.
问题是,如果该段包含任何URL,则Web浏览器控件必须将该URL显示为超链接.
例如:正在浏览以下段落.
WebBrowser.NavigateToString(我经常通过http://www.codeproject.com进行更新.这非常有用.");
实际结果是:
我会定期通过http://www.codeproject.com更新.而且非常有用.
预期结果:
我会定期通过 http://www.codeproject.com 更新.而且非常有用.
任何帮助,不胜感激.
在此先感谢.
Mydeen
Hi All,
I am writing a small WPF application where I have used a web browser control.
I am getting some paragraph from db and putting the paragraph in the broser control by using webbrowser.NavigateTostring() method.
The problem is, in case the paragraph contains any URL, the web browser controls has to show that URL as a hyperlink.
Eg: Am navigating a paragraph as below.
WebBrowser.NavigateToString("I am regularly updating through http://www.codeproject.com. And It is very useful.");
Actual Result Is :
I am regularly updating through http://www.codeproject.com. And It is very useful.
Expected Result :
I am regularly updating through http://www.codeproject.com. And It is very useful.
Any help much appreciated.
Thanks in Advance.
Mydeen
推荐答案
这篇关于WPF Web浏览器NavigateToString不显示字符串内容中的链接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!