在WPF应用程序中如何托管Flash内容并使用透明度? [英] How can one host Flash content in a WPF application and use transparency?

查看:137
本文介绍了在WPF应用程序中如何托管Flash内容并使用透明度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在WPF窗体中托管Flash内容,并在我的WPF窗口上仍然使用透明度/透明度?除非您使用的显示Flash内容的控件是在WPF中构建的,否则您将无法使用这个控件。

你会遇到这些空域问题。从Win32到WinForms的每一种显示技术都使用引擎盖下的HWND,但WPF使用DirectX。然而Windows中的窗口管理器仍然只能理解HWND,所以WPF应用程序有一个基于HWND的顶层窗口,在DirectX中所有的东西都是在DirectX中完成的(事实上上下文菜单和工具提示也有顶层的HWND) 。 Adam Nathan在这篇文章中有很好的WPF互操作描述。

How can I go about hosting flash content inside a WPF form and still use transparency/alpha on my WPF window? Hosting a WinForms flash controls does not allow this.

解决方案

Unless the control you use to display the Flash content is built in WPF, you will run in to these "airspace" issues. Every display technology from Win32 to WinForms used HWNDs "under the hood", but WPF uses DirectX. The Window Manager in Windows however, still only understands HWNDs, so WPF apps have one top-level HWND-based window, and everything under that is done in DirectX (actually things like context menus and tooltips also have top-level HWNDs as well). Adam Nathan has a very good description of WPF interop in this article.

这篇关于在WPF应用程序中如何托管Flash内容并使用透明度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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