According to the MSDN documentation , the ribbon: RibbonControlSizeDefinition can be used to control the size of an element in the WPF ribbon by setting the ControlSizeDefinition Property. Has anyone had success using this property? I believe that it is completely ignored. I initially installed it using data binding, but also tried using the code behind the file.
This question is similar, but in one of the comments he correctly noted that the OP used RibbonControlGroup and therefore saw the expected behavior.
I understand that it is usually best to allow the tape to do this on its own with regard to calibration. Unfortunately, this is not an option for this project.
I have listed the part of my XAML code that does not 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>
source
share