Wpf _如何在datagrid中显示长文本 [英] Wpf _ How can I display a long text in datagrid

查看:457
本文介绍了Wpf _如何在datagrid中显示长文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的WPF datagrid的列宽是auto,这意味着行中的长文本被截断。如何进行文本换行?

My WPF datagrid's columns width is auto , which means long text in the rows are cut off. How can I have the text wrap?

推荐答案

模板中带有 TextBlock 的单元格已启用文本换行。

这里 [ ^ ]是一个例如。
Template the cells with a TextBlock which has text-wrapping enabled.
Here[^] is an example.


它的工作!!非常感谢你

你真的帮助我
its work !!Thank you very much bro
you realy help me


这篇关于Wpf _如何在datagrid中显示长文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆