问题描述
我知道如何使用XML(使用idMso
标签)将现有Office Ribbon项目或组添加到自定义功能区,但是如何使用Visual Studio Ribbon( Visual Designer )技术?
I know how to add existing Office Ribbon items or groups to my custom ribbon using XML (using idMso
tags) but how do I do this using the Visual Studio Ribbon (Visual Designer) technique?
真的不是必须使用XML来构建整个东西.
Would really rather not have to build the entire thing using XML.
推荐答案
在 Ribbon Designer 中,您可以访问 ControlId
指向 Ribbon UI XML 中使用的idMSO
.更具体地说, ControlId.OfficeId
表示包含特定的Office控件的idMSO
属性.标识符.
In Ribbon Designer, you can access the ControlId
which points to the idMSO
used in Ribbon UI XML. More specifically, ControlId.OfficeId
represents the idMSO
property that contains the specific Office control identifier.
tools.Ribbon.RibbonTab tab = Globals.Factory.GetRibbonFactory().CreateRibbonTab();
tab.ControlId.OfficeId = "TabNewMailMessage";
这篇关于将预定义的Office功能区按钮添加到Visual Ribbon设计器中的自定义功能区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!