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?
Hello,
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.
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.
Hello Graham,
Thank you for your feedback.
Let me know if you need any further assistance with this issue.