Is there a way to identify if TextTrimming
is triggered?
For example in my first row, text is not trimmed because its only 20 characters, in my second row text are 1500 characters and it trims the text, is there a way to identify it, like IsTextTrimmed
property?
<TextBlock TextWrapping="Wrap" Text="{Binding test}" TextTrimming="WordEllipsis" />
Thank you
According to the MSDN documentation on the TextWrapping property,
You can detect clipped text programmatically because ActualWidth for a TextBlock always reports the expanded size of the text, even if it does not fit in the layout container. If you know where to read the Width for the layout container that is doing the clipping, you can compare these two values.