WPF 帧控件 [英] WPF Frame control

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

问题描述

我有一个包含 Frame 控件的 WPF 应用程序.框架控件显示 html 内容.html 页面包含一个 JavaScript 函数,我想在 html 页面加载到 Frame 和 WPF 代码后调用它?有没有办法可以调用在 WPF 框架控件和 WPF 代码中加载的 html 页面的 JavaScript 方法?

I have a WPF application containing a Frame control. The frame control displays the html content. The html page contains a JavaScript function which I want to call after html page is loaded on Frame and from the WPF code ? Is there a way I can call JavaScript method of html page loaded in WPF frame control and from within WPF code?

推荐答案

您无法与框架内的 HTML 进行交互.为了与 HTML 交互,您可以使用 WPF 的 .NET 3.5 SP1 的 WebBrowser 控件.

You can't interact with the HTML inside of a frame. In order to interact with HTML, you can use WPF's WebBrowser control of .NET 3.5 SP1.

您可以在此视频中看到在 WebBrowser 控件中的操作:

You can see in WebBrowser control in action in this video:

http://channel9.msdn.com/posts/AdamKinney/WPF-35-SP1-App-Model-with-Jennifer-Lee/

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

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