如何将组添加到多个内置功能区选项卡(vsto)? [英] How to add a group to multiple built-in Ribbon tabs (vsto)?

查看:207
本文介绍了如何将组添加到多个内置功能区选项卡(vsto)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是VS2010 + Office 2010加载项.我想要的只是向多个内置标签添加一个按钮(或按钮组).例如,我的按钮应该同时在新邮件消息功能区新约会功能区中可用.我尝试添加一个新选项卡(在Visual Designer中为 ),但这似乎不起作用.该按钮组显示在新邮件"选项卡上,而不显示在约会"选项卡上.顺便说一句,我正在使用以下ID:TabNewMailMessageTabAppointment.

This is VS2010 + Office 2010 add-in. All I want is to add a button (or button group) to multiple built-in tabs. For example, my buttons should be available in both New Mail Message Ribbon and in New Appointment Ribbon. I have tried adding a new tab (in the Visual Designer) but that doesn't seem to work. The button group appears on the New Mail Message tab, but not on the Appointment tab. BTW, I'm using the following IDs: TabNewMailMessage and TabAppointment.

推荐答案

对于其他与此有关的人,我能够在约会"和新邮件"选项卡上看到我的组的唯一方法是通过添加一个功能区每个内置选项卡,然后将所有UI和代码从一个功能区复制/粘贴到另一个功能区.确保为每个内置选项卡选择正确的RibbonType(Ribbon的属性).

For anyone else pulling their hair about this, the only way I was able to see my group on both Appointment and New Mail Message tabs was by adding one Ribbon for each built-in tab, and then copy/pasting all of the UI and code from one Ribbon to the other. Make sure you choose proper RibbonType (a property of your Ribbon) for each built-in tab.

这篇关于如何将组添加到多个内置功能区选项卡(vsto)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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