Hi,
i've a problem with the maximumsize property of the radiobuttontool. When i set it to "ImageAndTextLarge", the button keep its normal size. An easy way to test it : Put the following in a RibbonGroup element :
<
igRibbon:RadioButtonTool Caption="1" MaximumSize="ImageAndTextLarge" MinimumSize="ImageAndTextLarge"/>
="ImageAndTextLarge"/>
="ImageAndTextNormal"/>
I think it's a bug, am I wrong ? Is there a workaround for this ?
thanx a lot.
This was actually by design.
However, in the upcoming 10.3 release, we've added support for a Large RadioButtonTool.
If you cannot wait for the release, you can actually workaround this with a little of work.
First you'd need to derive your own Tool, you can derive directly from RadioButtonTool. Then override the MaximumSize and MinimumSize properties. You can simply make them with an empty Get/Set:
public override RibbonToolSizingMode MaximumSize{ get; set;}
public override RibbonToolSizingMode MinimumSize{ get; set;}
Then you need to restyle the RadioButtonTool's ControlTemplate to add a large style. To save you some time, I've attached an already updated style which contains all the brushes and converters you'll need for the style
Hope this helps,
-SteveZ
thanx for the reply.
Well i did the derive / override stuff, and add the style you gave me. But when i set the MaximumSize or the minimum size properties to "ImageAndTextLarge", the button would just not render. With other values, it shows up, no problem. Am i missing something ? Should not i have to set the visual state manually somewhere ? Is it possible that the style you gave me would conflict with the "normal" style of the RadiobuttonTool ?
Here is my code :
public
class TestRadioButtonTool : RadioButtonTool
{
get ; set ; }
}
And for the xaml :
igTest:TestRadioButtonTool Caption="efghfh" MaximumSize="ImageAndTextLarge" MinimumSize="ImageAndTextLarge"/>
My bad, I just needed to name the style and add it to my element. I thought that it would override the normal style, but it doesn't. That was so obvious that i didn't think about it :)
Anyways thanx for the solution !