WPF WebBrowser 加載 html ,出現安全警告, 運行 腳本和 activeX 控件,


 

對於你的問題,只需要在你的HTML首行添加如下代碼即可隱藏安全提示條:

<!-- saved from url=(0014)about:internet -->

 

還有一個可選方案是使用Winform的WebBrowser控件,不需要更改HTML代碼,也不會出現安全提示,需要WindowsFormsHost:

xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"> <Grid> <WindowsFormsHost> <wf:WebBrowser x:Name="webbrowser1"/> </WindowsFormsHost> </Grid>

 

可見: http://msdn.microsoft.com/en-us/library/ms751761(v=vs.110).aspx


We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. 
Click HERE to participate the survey.

 

https://social.msdn.microsoft.com/Forums/sqlserver/zh-CN/f070e94a-92b3-451f-a4af-7fa5265eb818/wpf-webbrowser-html-activex-?forum=wpfzhchs


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM