Hi there,
we currently got the problem that some ribbon groups are not rendered correctly. We use the ItemVariantBehavior of 'MediumThenSmallWhenSmall'. The width is the medium one but the icons are rendered as small ones.
This problem only occurs on the startup of the application. If we decrease or increase the size of the application that the ribbon will be rerendered then everything is working fine.
There seems to be a problem with the calculation of the ribbon group size. This problem is dependent on the length of the button label. If we change the language then the problem disappears.
Sample code of a ribbon group where the problem occurs:
<ribbon:Group
x:Class="Ribbon.SubControls.RibbonDrawingEscGroup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:phx="http://PhoenixNamespaceSchema.com"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
xmlns:viewModels="clr-namespace:MainWindow.ViewModel.Ribbon"
Uid="DrawingModifyTools"
d:DataContext="{d:DesignInstance Type={x:Type viewModels:RibbonViewModelBase}}"
d:DesignHeight="450"
d:DesignWidth="800"
ImageSourceSmall="{Binding Converter={phx:GetImageSourceFromImageLibraryConverter}, ConverterParameter=Border16}"
IsCollapsible="False"
Label=""
mc:Ignorable="d">
<ribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall">
<ribbon:Button
Command="{Binding GlobalDeleteDefaultControlViewModel.GlobalDeleteCommand}"
IsChecked="{Binding GlobalDeleteDefaultControlViewModel.IsGlobalDeleteActive}" />
<ribbon:Button
Command="{Binding GlobalDeleteDefaultControlViewModel.GlobalDefaultControlDataCommand}"
IsChecked="{Binding GlobalDeleteDefaultControlViewModel.IsGlobalDefaultControlDataActive}" />
<ribbon:Button
Command="{Binding DrawingSelectionControlViewModel.DrawEscCommand}"
Focusable="False" />
</ribbon:StackPanel>
</ribbon:Group>
Is there something we can to trigger a rerendering as a workaround? Or is there something wrong with the code?
If you need a screenshot of the problem please contact me.
Best regards
Patrick Neubauer
[Modified 4 years ago]