Silverlight: TextTrimming
Is there a way to identify if TextTrim开发者_如何转开发ming
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.
精彩评论