Why TextTrimming is not working?


  • Hi All,

    I am using VS2010 Professional and Silverlight 4. Within a canvas, I added a TextBlock as below. I am expecting it to trim the text and place an ellipsis at last. But it is not happening.




    TextBlock x:Name="txbMessage" Canvas.Top="20" Width="200" Height="20" HorizontalAlignment="Left" Margin="1,1,1,1" TextWrapping="NoWrap" Text="I'm posting these from the PDC as Silverlight 4 is announced for the first time so please bear that in mind when working through these posts." TextTrimming="WordEllipsis" />

    Can some one suggest me what am I doing wrong?



    Wednesday, August 04, 2010 1:32 PM


  • Hi Sree,

    This may be a bug from Sliverlight. If you replace the Canvas with Grid, you can get what you expected. Or use Canvas in WPF Appilcation.


    • Marked as answer by Sreetharan S T Thursday, August 05, 2010 5:25 AM
    Wednesday, August 04, 2010 2:38 PM

All replies