hi
I'm trying to resize the ButtonTool of Ribbon. I've modified the "RibbonButtonToolTemplate" in the RibbonGeneric.xaml.
The problem is that when i place a ButtonTool in a RibbonGroup they are not alligned Horizzontally but Vertically.
This is the expected behavior. The attached property is not an inherited property (which would actually add overhead for all usage of the property) and since the property is only checked for objects with the tool layout panels setting it on anything else will have no effect. You have to set it on the tool.
I tried setting the MaximumSize property on the RibbonGroup object in Xaml and not on the ButtonTool, something like:
<igRibbon:RibbonGroup Caption="Online Help" MaximumSize="ImageAndTextLarge">
As you can see it allows the property to be set and it compiles, but does not make the icons within the group large.
If I set the MaximumSize property directly on the ButtonTool, it works and makes the icon large, something like:
<igRibbon:ButtonTool Caption="Contents" Name="btnHelpContents" igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge">
Can you tell me if there is a proper way to do this, or perhaps is this a bug? It would certainly be nice if the ButtonTool objects within a RibbonGroup would inherit this setting from their group unless otherwise explicitly specified.
This is using NetAdvantage for WPF 2012.1.
Thanks,
David Drucker
EasyLobby / HID Global
It worked. Thanks. You solved my problem.
Bye
thanks again.
The default ButtonTool template already has support for resizing so that it can show just an image, image and text or a large button with image and text. By default ButtonTool uses the ImageAndText as its maximum size since in Office that is the most common type of button. You can change that for your ButtonTool instances by setting the attached RibbonGroup.MaximumSize property to ImageAndTextLarge. If you don't want a particular ButtonTool to be able to be resized down you can set the attached RibbonGroup.MinimumSize (e.g. to ImageAndText or ImageAndTextLarge).
Hi
Thanks for the answer.
In my WPF application i'm using the XamRibbon. My problem is that in the wpf xamribbon the ButtonTool is very small :(image of a ribbon with buttontool, in my WPF app)
Instead i want a ButtonTool like in Silvelright ribbon: (image of a ribbon with buttontool, in my Silverlight application)