WPF不支持Textbox.MinLines用于自动高度计算 [英] WPF doesn't honor Textbox.MinLines for Auto height calculation

查看:123
本文介绍了WPF不支持Textbox.MinLines用于自动高度计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有一个文本框,高度随着Iam输入文本行而增加.

I want to have a TextBox which Height grows as Iam entering lines of Text.

我已经将Height属性设置为"Auto",到目前为止,这项工作还在不断发展. 现在,我希望文本框的高度至少应为5行. 现在,我将MinLines属性设置为"5",但是如果我启动该应用程序,则TextBox的高度仍为一行.

I've set the Height property to "Auto", and so far the growing works. Now I want that the TextBox's Height should be at least 5 lines. Now I've set the MinLines property to "5" but if I start the app the TextBox's height is still one line.

推荐答案

尝试设置MinHeight属性.

Try setting the MinHeight property.

这篇关于WPF不支持Textbox.MinLines用于自动高度计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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