将预定义的Office功能区按钮添加到Visual Ribbon设计器中的自定义功能区 [英] Adding pre-defined Office Ribbon button to custom ribbon in Visual Ribbon Designer

查看:159
本文介绍了将预定义的Office功能区按钮添加到Visual Ribbon设计器中的自定义功能区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用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.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设计器中的自定义功能区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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