GalleryTool tends to display images in their real dimensions, but sometimes not all images are equal. Is there a possibility of setting one size for all e.g. 50x50?
One way to solve this would be to set the Width and Height for the image assigned to the GalleryItem. With WPF styles, you could apply a Style which sets the Width and Height for all images in the GalleryTool. You could define the Style in the GalleryTool.Resources to limit the scope of such a style.
If you would like a sample of a style like this in XAML, C# or VB.Net, let me know which language you prefer.
Thanks,
I'm having this same problem, trying to get the height of the images in my GalleryItems to be what I want them to be.
Here's a shot of the problem I'm facing:
See, there is all that white space underneath, and it's clearly part of the GalleryItem as I have the first one selected. I want to get rid of that and have nice square items.
Here's my XAML:
<igRibbon:MenuTool ButtonType="DropDown" SmallImage="{Binding Path=SelectedItem.Image, ElementName=gtlSecondary}"> <igRibbon:GalleryTool x:Name="gtlSecondary" ItemBehavior="StateButton" Width="72" AllowResizeDropDown="False"> <igRibbon:GalleryTool.Items> <igRibbon:GalleryItem Key="SecondaryAlphabetical" Image="Images/16/Alphabetized.png" IsSelected="True"/> <igRibbon:GalleryItem Key="SecondaryCategorized" Image="Images/16/Categorized.png"/> <igRibbon:GalleryItem Key="SecondaryReferences" Image="Images/16/References.png"/> </igRibbon:GalleryTool.Items> </igRibbon:GalleryTool></igRibbon:MenuTool>
The pngs above are 16x16, which I'm using on 24x24 buttons. If I set the Height on the GalleryTool like I did for Width, it just cuts off the items and adds a scrollbar at the end, which I don't want.
I don't think this bears on the problem, but I'm using my MenuTool outside of the Ribbon elsewhere in my GUI, fyi. Hasn't been a problem any other way. I don't think item heights are affected by it.
So I'd love to see what you're offering in XAML to fix my height issue.
Chris
Hi, man, I'm evaluating the ribbon control but don't know how to set its image size. Could you show me your codes (XAML and C#) to handle it?