I have a column with long user comments. I download it with the following code ...
<my:DataGridTextColumn Header="Message"
Binding="{Binding UserMessage, Mode=OneWay}"
CanUserSort="True">
<my:DataGridTextColumn.ElementStyle>
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="TextWrapping"
Value="NoWrap" />
<Setter Property="TextTrimming"
Value="CharacterEllipsis"/>
<Setter Property="ToolTip"
Value="{Binding Path=UserMessage, Mode=OneWay}"/>
</Style>
</my:DataGridTextColumn.ElementStyle>
</my:DataGridTextColumn>
But the ellipsis will not work. The column continues to display long data text. In addition, when I set the width of the text block explicitly to some value, the ellipsis works fine, but when I resize my column, it will not display more text in it.
Is there any way to do this?
Thanks Vinet Sanke.
source
share