wrap text

Sep 25, 2008 at 4:51 AM
Hello,

is it possible to wrap long text in a cell? The cell height should be automatically adapted so that the total text is visible?
Is there a way to do that?

Best regards
Mariser

Sorry for my bad english.
Coordinator
Sep 25, 2008 at 2:05 PM
Try setting TextWrapping to "Wrap" on the ElementStyle of a DataGridTextColumn.

<

 

Style x:Key="tb_ElementStyle" TargetType="TextBlock">
    <Setter Property="TextWrapping" Value="Wrap" />
</Style>

 

<

 

dg:DataGridTextColumn Width="150" DataFieldBinding="{Binding Path=FirstName}" ElementStyle="{StaticResource tb_ElementStyle}"/>

 

Sep 26, 2008 at 7:31 AM
Many thanks for your help.

Best regards
Mariser