Hi,
It looks like xamRibbon only supports 32x32 for the LargeImage size. Unfortunately our large image size is 24x24. We have hundreds of these icons, any of which can appear in the ribbon's application menu. Recreating all of these at 32x32 would be a major undertaking.
Is there any way to change the ribbon's large image size in xamRibbon? You can do this in the WinForm version of your ribbon control.
If not, any advice you can throw my way?
Thanks,Jim Honeycutt
The sizes (width/height properties) of the image elements is actually determined in the xaml and not by any property on the xamRibbon so to change the size used by the elements you would need to create modified versions of the templates. We ship the default styles/templates with the product in the DefaultStyles directory so you could use that as the basis for creating your own modified templates.
Hello Andrew, I'm building an application that, according to the user screen resolution detected at runtime on the user's machine, will use images proportionally resized. Big resolution... big images.
So I would love to change the LargeImage and SmallImage default sizes. Is there one single place where I may do such a change for any window in my app, or should I customize each component (ie Outlook Bar, Grid)?
It would be nice to have this value overridable either in code and in xaml.I have a singleton helper class that detects the screen resolution and sets a couple of FontSize property like Standard (to be used as normal text) and a couple more increasinlgy larger or smaller.
Then I bind the fontsize in xaml for each window like this:FontSize="{Binding Source={x:Static utility:LayoutHelper.Instance}, Path=FontSizeStandard}" or FontSize="{Binding Source={x:Static utility:LayoutHelper.Instance}, Path=FontSizeTitle}" and those dimensions are related to the user screen resolution.
I use the same criteria for the icons I use in my software. Now I would love to do the same when I use your controls. Can you be as detailed as possible on how I can accomplish this? What syntax should I use to create a template that has, as only difference, the LargeImage and SmallImage size.
Best Regards
Currently there are no properties exposed (at least in the xamRibbon) that relate to the image sizes. Instead this is left up to the templates as would normally occur in a lookless control. I will submit a suggestion for exposing a more centralized way (property/resource) to control the image size so maybe this can be implemented in a future version. So basically right now you would need to retemplate the relevant elements. We provide the default xaml for the elements in the DefaultStyles directory so you can use that as the basis for your custom templates. I don't have a list of the various elements that you would need to retemplate but basically within those styles you will likely find a number of elements (mostly Image or AutoDisabledImage) that have their Width/Height set to 16 or 32 and then triggers that would set it to the other value if the state dictated. E.g. the button tool's default template has a key of "RibbonButtonToolTemplate". Within this template there is an AutoDisabledImage whose Width/Height are set to 16. There are then triggers within that template that would set that element's Width/Height to 32 if its sizing mode is ImageAndTextLarge.