I have an application using the ribbon and have set up images for large and small sizes and tool tips etc. but would like the user to be able to alter the size of the images, if the items are displayed as text, image or text+image and assign shortcuts. I know this is possible if you are using toolbars does anyone know how to do it using the tibbon?
Best RegardsGraham Wade
Hello Wade,
RibbonGroup has a property PreferedToolSize which determine the preferred displayed size of the tool, so you could iterate throw all RibbonGroup and set this property to one of RibbonToolSize enumerator. You could use code like this :
foreach (RibbonTab tab in ultraToolbarsManager1.Ribbon.Tabs)
{
foreach (RibbonGroup group in tab.Groups)
group.PreferredToolSize = RibbonToolSize. Large[ImageOnly,Normal, ..];
group.Settings.CanCollapse = Infragistics.Win.DefaultableBoolean.False;
}
tab.GroupSettings.CanCollapse = Infragistics.Win.DefaultableBoolean.False;
Let me know if you have any further questions.
Hristo
Thanks for the info on image sizes. I was really looking for a built-in customisation dialog such as is included with toolbars. Do I assume from your response that their isn't one and so I will have to generate one myself?
Marcello
What I ended up doing is calling toolbarmanager.customise from a menu item. This displays the toolbar customise and allows shortcuts etc to be set for toolbar items. I then set the size of the ribbon tool images to be the same as that specified for the toolbars in the customisation dialog. This basically invlolves looping through all tabs/ groups/ items in the ribbon and setting the preferred size.
Hope this help
RegardsGraham Wade
Hello,
I have followed the thread and successfully showed builtin customization form for ultraToolBar. In any case such a way allows only to manage ToolBars and does not allow to interact with robbon groups and tabs. Is there a built in way to obtain such a result? It could be very hard to reimplement all that.
Please advice.
Hello Graham,
Thank you for your feedback.
Let me know if you need any further assistance with this issue.
My form has no Toolbars and a ribbon. The customise toolbars shortcut cannot be selected in this case. I have now added a customise menu item and called the toolbarmanager customise dialog which lets me do most of what I want. I then change the size of the ribbon icons depending upon the settings for toolbars using the code supplied.
It would be much better if the customise toolbar dialog was also able to customise the ribbon automatically and was selectable at runtime.
UltraToolBarsManager has built in customization dialog, which allows you to customize some properties of the tools. To be able to display CustomizeDialog at runtime you should set Office2007UICompatibility of UltraToolbarsManager to false. You could display CustomizeDialog
With ultraToolbarsManager.Customize();. May be this is what you are looking for.