Users Pricing

forum

Home Forums Text wrapping not working in wpf. – MindStick

Text wrapping not working in wpf.

Anonymous User 3165 18 Jul 2013
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.

<Grid>

  <Grid.ColumnDefinitions>

    <ColumnDefinition Width="60" />

    <ColumnDefinition Width="*" />

  </Grid.ColumnDefinitions>

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

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

</Grid>

Thanks!


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md