Hello, to all.
I am trying to create my own custom ribbon panel with my own buttons.
I've come to understand, that whether I get a large button or a small one depends on whether I use stacking.
It stacking is not used, a large button is created. If stacking is used - small ones.
But in the original Revit UI there seem to be cases with large stacked buttons. For example these are clearly large buttons stacked.
How is this done?
When I do the regular stacking like so
var manualButtonsLeft = ribbonPanelWallbox.AddStackedItems(
btn_scBxManual_TopLeft,
btn_scBxManual_BotLeft);
I always get small buttons:
Is there a way to change button size?
Solved! Go to Solution.
Solved by Kennan.Chen. Go to Solution.
void SetLargeButtonStyle(RibbonButton button)
{
button.ResizeStyle = RibbonItemResizeStyles.NoResize;
button.Orientation = Orientation.Vertical;
button.Size = RibbonItemSize.Large;
}
Note that the RibbonButton is Autodesk.Windows.RibbonButton provided by AdWindows.dll
That was it. Thank you!
I was trying to achieve this without AdWindows.
Interesting, how the use of AdWindows.dll is not officially supported, but lots of useful tweaks are available only through this library.
It is officially supported, partially, not by Revit but by AutoCAD. You can refer to the AutoCAD managed .NET docs.
BTW, visual studio intellisense could actually be a much better documentation after hours of exploring.
Can't find what you're looking for? Ask the community or share your knowledge.