TextBlock text wrapping in GridViewColumn.CellTemplate not working TextBlock text wrapping in GridViewColumn.CellTemplate not working wpf wpf

TextBlock text wrapping in GridViewColumn.CellTemplate not working


You are setting both DisplayMemberBinding and CellTemplate. Remove DisplayMemberBinding when you use CellTemplate. Also remove the Width for the TextBlock and it'll work

<ListView ...>    <ListView.View>        <GridView>            <!-- ... -->            <GridViewColumn Header="Description" Width="385">                <GridViewColumn.CellTemplate>                    <DataTemplate>                        <TextBlock TextWrapping="Wrap" Text="{Binding Description}" />                    </DataTemplate>                </GridViewColumn.CellTemplate>            </GridViewColumn>            <!-- ... -->        </GridView>    </ListView.View></ListView>