
I am trying to use the RibbonGallery with the ItemTemplate containing 4 TextBlock with bound strings.
When the font size changes or the language, the gallery items tend to overlap.
It seems the next gallery item is starting before the end of the previous one.
Here is my example:
<ribbon:Group Label="{Resx ResxName=SES.Modules.XxtrWPF.RibbonView, Key=rgbXSTab_FaxGroup_Header}" MinWidth="50" FontSize="{Binding Source={x:Static infTools:XxtrTools.SharedSettings}, Path=FontSize, Mode=OneWay}">
<ribbon:RibbonGallery ItemsSource ="{Binding Path=CurrentXS.Faxs, Mode=TwoWay}" VariantBehavior="Default" VariantSize="Small">
<ribbon:RibbonGallery.ItemTemplate > <DataTemplate> <Border Name="FaxGalleryBorder" BorderBrush="#C0C0C0" BorderThickness="2" MinWidth="160" MaxWidth="400"> <StackPanel Margin="4">
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Resx ResxName=SES.Modules.XxtrWPF.RibbonView, Key=lblFaxNumber_Content}"/> <TextBlock Text="{Binding Path=Index, Mode=TwoWay}"/> </StackPanel>
<StackPanel Orientation="Horizontal"> <TextBlock Text="{Resx ResxName=SES.Modules.XxtrWPF.RibbonView, Key=lblFaxName_Content}"/> <TextBlock Text="{Binding Path=Name, Mode=TwoWay}" TextTrimming="CharacterEllipsis"/> </StackPanel>
</StackPanel> </Border> </DataTemplate> </ribbon:RibbonGallery.ItemTemplate> </ribbon:RibbonGallery> </ribbon:Group>
[Modified 10 years ago]