CommunityToolkit/WindowsCommunityToolkit

DataGrid: TextWrapping fixing issue when resizing

Open

#2.791 geöffnet am 8. Feb. 2019

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (1.403 Forks)batch import
DataGrid :capital_abcd:bug :bug:help wanted

Repository-Metriken

Stars
 (5.708 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

What is the proper method of applying text wrapping so that when resizing a column to auto adjust the row height?

https://stackoverflow.com/questions/54584552/uwp-datagrid-textwrapping-rowheight-issues

<controls:DataGridTextColumn Width="300" IsReadOnly="True" Header="Description" Binding="{Binding Description}">
	<controls:DataGridTextColumn.ElementStyle>
		<Style TargetType="TextBlock">
			<Setter Property="TextWrapping" Value="Wrap" />
		</Style>
	</controls:DataGridTextColumn.ElementStyle>
</controls:DataGridTextColumn>

Contributor Guide