According to the MSDN documentation, a ribbon:RibbonControlSizeDefinition can be used to control the size of an item on a WPF ribbon by setting the ControlSizeDefinition property. Has anyone had any success using this property? I find that it is completely ignored. I initially set it using data binding, but have also tried using the code behind file.
This question is similar, but it is correctly noted in one of the comments that the OP had used a RibbonControlGroup, and therefore was seeing the expected behaviour.
I understand that it's usually best to allow the ribbon to do it's own thing regarding sizing. Sadly that's not an option for this project.
I've listed the part of my XAML code that doesn't work below.
<ribbon:RibbonTab Header="MyTab">
<ribbon:RibbonGroup Header="MyGroup">
<ribbon:RibbonButton Label="My big button" Name="BigButton"
LargeImageSource="Images\Ribbon\assignments_duties_a2k_32.png"
SmallImageSource="Images\Ribbon\assignments_duties_a2k_16.png">
<ribbon:RibbonButton.ControlSizeDefinition>
<ribbon:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
</ribbon:RibbonButton.ControlSizeDefinition>
</ribbon:RibbonButton>
<ribbon:RibbonButton Label="My little button" Name="SmallButton"
LargeImageSource="Images\Ribbon\assignments_duties_a2k_32.png"
SmallImageSource="Images\Ribbon\assignments_duties_a2k_16.png">
<ribbon:RibbonButton.ControlSizeDefinition>
<ribbon:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True" />
</ribbon:RibbonButton.ControlSizeDefinition>
</ribbon:RibbonButton>
</ribbon:RibbonGroup>
</ribbon:RibbonTab>