This is my Xaml code. I want the subject to be trimmed. But there is no effect of wordellipsis.
<StackPanel Orientation="Vertical" Grid.Column="2" Margin="10, 0, 20, 0">
<TextBlock TextTrimming="WordEllipsis" Margin="0,2,0,2" Foreground="#666666"
Text="{Binding Subject}" FontSize="16" FontFamily="Segoe UI" FontWeight="Bold"/>
.....
</StackPanel>
What am I doing wrong ?
You can not limit the width of stack panel. I mean you can set maxwidth of stack panel and In UI maybe you will see that stackpanel's width is not increasing but actually it's with is increasing. What to do is just try to use Grid or If you need to use StackPanel, put a Grid in side of stackpanel and put your textblock inside of your grid. After that you need to give maxwidth to your grid...