CommunityToolkit/WindowsCommunityToolkit

DataGrid: TextWrapping fixing issue when resizing

Open

#2,791 建立於 2019年2月8日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)C# (1,403 fork)batch import
DataGrid :capital_abcd:bug :bug:help wanted

倉庫指標

Star
 (5,708 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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>

貢獻者指南