开发者

How to control the size of a TextBlock so the contents are fully displayed

in WPF is there a way to setup a TextBlock so its MinHeiht and MinWidth are automatically set so its content is completely visible or should I code this by myself?

Thanks.

EDIT: The TextBlock lives inside a grid row, I would like to setup 开发者_如何学运维the Min sizes of the row to allow the TextBlock to show its entire content.


If you set the columndefinition width for the textblock's column to 'Auto', it will grow automatically to accommodate the growing textblock.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜