I have 2 windows 7 machines with the same custom .net 4.5.1 WPF application binaries and the same version of the .net framework on both (4.5.1), connected to identical monitors at the same size and resolution. I have a TextBlock with the same data but the text is too long for the box. Text is set to 100% enlargement in windows on both machines.
For some strange reason the text is trimmed (WordElipsis) in different places on each system so it appears different and behaves in a non deterministic fashion given everything else is the same on both machines.
What factors are used by WPF to decide where text is trimmed?
<TextBlock
Margin="5,5,0,0"
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2"
x:Name="StackPanel"
FontSize="10"
FontFamily="Gill Sans MT"
TextTrimming="WordEllipsis"
TextWrapping="Wrap"
ToolTip="{Binding MyThing.Title}">
<local:BindableInline x:Name="titleTextBlock" Text="{Binding MyThing.Title}"/>
</TextBlock>
Took a while to figure it out but it turns out the issue was fonts - Gill Sans MT was not installed on one of the machines meaning that it was falling back to another built in font that was slightly different causing the trimming to happen in a different place. The fix is to either install the font onto the machine or package the font with the application.