本文介绍了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用户控件
发布评论