VSTO - 如何使功能区按钮垂直填充空白区域

时间:2023-02-09 21:08:32

I'm building a VSTO excel application, using Visual Studio 2013. I have one Large sized Ribbon button in one column, next to two Regular sized in another column. What I want is to fill the vertical space in the regular buttons column equally.

我正在使用Visual Studio 2013构建VSTO excel应用程序。我在一列中有一个大尺寸功能区按钮,在另一列中有两个常规尺寸。我想要的是平均填充常规按钮列中的垂直空间。

To see an example of what I want to do, see the "Calculation" group of "FORMULAS" tab in excel. My regular buttons are stacking on the top, but i want them to fill the empty space just like the "Calculate Now" and the "Calculate Sheet" are doing in this ribbon.

要查看我想要做的示例,请参阅excel中“FORMULAS”选项卡的“计算”组。我的常规按钮堆叠在顶部,但我希望它们填充空白区域,就像“立即计算”和“计算工作表”在此功能区中一样。

How do I do this?

我该怎么做呢?

Thanks.

2 个解决方案

#1


The Fluent UI doesn't provide any property or attribute for that.

Fluent UI不提供任何属性或属性。

Read more about the Fluent UI (Ribbon UI) in the following series of articles:

在以下系列文章中阅读有关Fluent UI(功能区UI)的更多信息:

Not all features (controls) are available for external developers.

并非所有功能(控件)都可供外部开发人员使用。

#2


I'm not sure if you will be able to do this. I was also looking for this but didn't find a solution. The ribbon is limited for programmers in certain features, for example you cannot make a menu with headers (like the insert chart in excel) or in ribbon galleries (like the chart styles),... I think this button fill is also one of these features.

我不确定你是否能够做到这一点。我也在寻找这个,但没有找到解决方案。功能区限制为某些功能的程序员,例如,您不能使用标题(如excel中的插入图表)或功能区库(如图表样式)制作菜单,...我认为此按钮填充也是其中之一这些功能。

#1


The Fluent UI doesn't provide any property or attribute for that.

Fluent UI不提供任何属性或属性。

Read more about the Fluent UI (Ribbon UI) in the following series of articles:

在以下系列文章中阅读有关Fluent UI(功能区UI)的更多信息:

Not all features (controls) are available for external developers.

并非所有功能(控件)都可供外部开发人员使用。

#2


I'm not sure if you will be able to do this. I was also looking for this but didn't find a solution. The ribbon is limited for programmers in certain features, for example you cannot make a menu with headers (like the insert chart in excel) or in ribbon galleries (like the chart styles),... I think this button fill is also one of these features.

我不确定你是否能够做到这一点。我也在寻找这个,但没有找到解决方案。功能区限制为某些功能的程序员,例如,您不能使用标题(如excel中的插入图表)或功能区库(如图表样式)制作菜单,...我认为此按钮填充也是其中之一这些功能。