在 VSTO 功能区中插入 WPF 用户控件

发布于 2024-12-22 05:29:20 字数 191 浏览 4 评论 0原文

我使用 VS 2010 和现有的 WPF 用户控件开发了一个 Excel 2007 加载项。借助 ElementHost,可以轻松地将控件集成到任务窗格和窗口中,但我找不到将它们集成到功能区中的方法。与功能区设计器结合使用的工具箱不包含 ElementHost,也无法使用 WinForms 用户控件间接插入它。是否有另一种方法可以将 WPF 用户控件集成到功能区中?

I develop an Excel 2007 add-In using VS 2010 and existing WPF user controls. With the aid of ElementHost it is easy to integrate the controls in task panes and windows, but I found no way to integrate them in ribbons. The Toolbox in combination with the ribbon designer contains no ElementHost and no way to insert it indirectly using WinForms user controls. Is there another way to integrate WPF user controls in ribbons?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薄荷港 2024-12-29 05:29:20

您只能使用功能区 UI 元素来操作功能区。别无选择。这是一件好事 - 它使所有应用程序的 UI 保持一致。这是一种常见的UI 设计模式

You can only use Ribbon UI elements to manipulate the ribbon. There is no alternative. This is a good thing - it keeps the UI consistent across all applications. This is a common UI design pattern.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文