MS Word中的WPF用户控件 [英] Wpf user control in MS Word

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

问题描述

大家好,

我想知道如何用与ActiveX控件相同的方式将刚刚制作的WPF用户控件嵌入到MS Word文档中?

您认为这仍然可行吗?

提前非常感谢您.
最好的问候.
MiQi.

Hello everyone,

I would like to know how this could be possible to embed a wpf user control freshly made into a MS Word document in the same way we used to do with activex control ?

Do you think this is still possible ?

Thank you very much in advance.
Best regards.
MiQi.

推荐答案

通过ElementHost将WPF控件包装到Windows窗体的UserControl中,然后将此Windows窗体的控件公开为ActiveX控件,请参阅此有关如何操作的文章:

将Windows窗体控件公开为ActiveX控件 [
Wrap the WPF control into a Windows Forms'' UserControl via ElementHost, then expose this Windows Forms''s Control as ActiveX control, please refer to this article on how to do it:

Exposing Windows Forms Controls as ActiveX controls[^]


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

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