简体   繁体   English

WPF中的Windows窗体Web浏览器用户控件更新

[英]Windows Forms Web Browser User Control updating in WPF

I'm trying to use a Windows Forms Web Browser User Control in my WPF Application. 我正在尝试在WPF应用程序中使用Windows窗体Web浏览器用户控件。

<WindowsFormsHost Width="900" Grid.Column="0" Height="700" x:Name="WinFormsHost1" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Top"  Grid.ColumnSpan="2"/>

In my code I set the child of the WindowsFormsHost to an existing Web Browser in another object 在我的代码中,我将WindowsFormsHost的子代设置为另一个对象中的现有Web浏览器

WinFormsHost1.Child = bot.WebBrowser;

The Chrome Web Browser here is updating values in a table I need the user to be able to view (and see updated) - but but the other one hosted in my project is not updating, I have circled a value that has updated in Chrome but not in my wpf application. 这里的Chrome网络浏览器正在更新表格中的值我需要用户才能查看(并查看更新) - 但是我的项目中托管的另一个未更新,我已圈出已在Chrome中更新的值,但不在我的wpf应用程序中。

WPF Application on Left, Google Chrome on the Right 左侧的WPF应用程序,右侧的Google Chrome

http://i.imgur.com/73tBRu3.png

I would suggest that you follow Kess and test this on plain old IE first. 我建议你先关注Kess并在普通的旧IE上测试一下。 If Internet Explorer does not work as well then the web browser control is not for you. 如果Internet Explorer不能正常工作,那么Web浏览器控件不适合您。 I would suggest using Geckofx (Firefox Embedded C# control) or CefGlue (Chromium Embed) to display your information to the user. 我建议使用Geckofx(Firefox嵌入式C#控件)或CefGlue(Chromium Embed)向用户显示您的信息。

Geckofx Control Geckofx控制

CefGlue Control CefGlue控制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM