Home > DeveloperSection > Forums > Text wrapping not working in wpf.
Brad Pitt
Brad Pitt

Total Post:61

Posted on    July-18-2013 11:50 PM


 1 Reply(s)
 1452  View(s)
Rate this:
HI mindstick!

I got this XAML code and I've been trying to get it working for a few hours now (I'm pretty new to WPF). I basically want the text in the TextBlock to line break if there's not enough room for it.



    <ColumnDefinition Width="60" />

    <ColumnDefinition Width="*" />


  <Image Source="{Binding Path=imageurl}" Width="60" Height="60" Grid.Column="0" />

  <TextBlock TextWrapping="Wrap" Text="{Binding Path=content}" Grid.Column="1" />



shreesh chandra shukla
shreesh chandra shukla

Total Post:105

Posted on    July-19-2013 12:16 AM

you may try this

I basically set the Grid ColumnDefinition width to a fixed one and it works now.

Don't want to miss updates? Please click the below button!

Follow MindStick