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>

贡献者指南