将工具栏转换为功能区 [英] Converting toolbar into ribbon

查看:107
本文介绍了将工具栏转换为功能区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VC ++ ATL COM开发了MS Project Addin。现在,在MS Project 2013中实现它时,我想将工具栏转换为功能区。我怎么能做到这一点?是否有一个实用程序,可以将工具栏转换为功能区,保持功能
完好无损?



Adeel

I have MS Project Addin developed using VC++ ATL COM. Now while implementing it in MS Project 2013, I want to convert the toolbar into ribbon. How can I accomplish this? Is there a utility, that can convert toolbars into ribbon, keeping the functionality intact?


Adeel

推荐答案

Hello Adeel,

Hello Adeel,

命令栏和功能区UI是完全不同的东西,没有任何机制可以将一个转换为另一个。但是,默认情况下,命令栏控件可以显示在"加载项"选项卡上。但要创建功能区选项卡和自定义UI,您需要
才能使用功能区UI。

Command Bars and Ribbon UI are entirely different things, there is no any mechanism for converting one into another. However, you command bars controls can be displayed on the Add-Ins tab by default. But to create ribbon tabs and custom UI you need to use the Ribbon UI.

VSTO提供了两种不同的方式来为加载项创建自定义UI:

VSTO provide two different ways for creating custom UI for the add-in:

演练:创建一个使用功能区设计器自定义选项卡

演练:使用功能区XML创建自定义选项卡

请注意,设计人员不提供功能区的所有功能UI。

Be aware, the designer doesn't provide all the features of the Ribbon UI.

您可以在MSDN的以下系列文章中阅读有关Fluent UI(又名Ribbon UI)的更多信息:

You can read more about the Fluent UI (aka Ribbon UI) in the following series of articles in MSDN:

为开发人员自定义2007 Office Fluent功能区(第1部分,共3部分)

定制2007 Office Fluent Ribbon for Developers(第2部分,共3部分)

为开发人员自定义2007 Office Fluent功能区(第3部分,共3部分)

要使用VC ++添加功能区UI - 你需要实现

IRibbonExtensibility
界面,例如在C#中:

To get the Ribbon UI working in your VC++ add-in you need to implement the IRibbonExtensibility interface, for example in C#:

public class Connect : Object, Extensibility.IDTExtensibility2, IRibbonExtensibility 
... 
public string GetCustomUI(string RibbonID) 
{ 
 StreamReader customUIReader = new System.IO.StreamReader("C:\\RibbonXSampleCS\\customUI.xml"); 
 string customUIData = customUIReader.ReadToEnd(); 
 return customUIData; 
} 


这篇关于将工具栏转换为功能区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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