RibbonButton 类——它们可以扩展吗? [英] RibbonButton classes -- can they be extended?

查看:64
本文介绍了RibbonButton 类——它们可以扩展吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在为 Excel 构建功能区插件.功能区工具箱对我来说似乎非常有限,您甚至无法对其进行最基本的更改.

I have been building a ribbon plug in for Excel. The ribbon toolbox seems extremely limited to me, you can't make even the most basic changes to it.

例如,我希望能够用组名标记单元格.我有一个列出组名称的菜单,并允许您选择当前选定的单元格所在的组.我想要一个额外的菜单条目,说清除"以将它们从所有组中删除.理想情况下,不应将其设置为与组名称相同的类型,可能是斜体和灰色.但是,似乎没有办法调整菜单项的渲染.

For example, I want to be able to tag cells with a group name. I have a menu that lists the group names, and allows you to select which groups the currently selected cells are in. I want an additional menu entry to say "Clear" to remove them from all groups. Ideally it shouldn't be set in the same type as the group names, perhaps italic and gray. However, there seems to be no way to adjust the rendering of a menu item.

明确地说,我在谈论 Microsoft.Office.Tools.Ribbon...而不是 Windows 功能区按钮.

To be clear I am talking about Microsoft.Office.Tools.Ribbon... rather than the windows ribbon buttons.

通常我只会扩展控件,但这些项目来自工厂,因此无法更改创建的类型.

Normally I'd just extend the control, but these items come from a factory so there is no way to change the created type.

有什么建议吗?

推荐答案

我花了很多时间寻找自定义 Ribbon 控件的方法,但没有找到方法.即使是简单的设置,比如设置字体、字体大小、粗体、斜体,从我设法阅读的主题来看也是不可能的.

I spent quite some time looking for way to customize the Ribbon controls, but haven't found a way. Even simple things like setting fonts, font sizes, bold, italic is impossible from what I managed to read on the subject.

另一件令人沮丧的事情是,您无法重现 Office 核心功能中的某些功能区效果.例如在功能区画廊是不可能重现的.

Another frustrating thing is also that you cannot reproduce some Ribbon effects that are in the core Office functionality. For example in ribbon gallery is impossible to reproduce.

这篇关于RibbonButton 类——它们可以扩展吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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