微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

WPF中的自定义文本换行

有没有办法在 WPF中的非矩形容器中包装文本?

Here is how it is done in photoshop

解决方法

遗憾的是,如果没有完全实现textformatter,就没有直接的方法. MSDN article on the basics of an Advanced TextFormatter

The text layout and UI controls in WPF provide formatting properties that allow you to easily include formatted text in your application. These controls expose a number of properties to handle the presentation of text,which includes its typeface,size,and color. Under ordinary circumstances,these controls can handle the majority of text presentation in your application. However,some advanced scenarios require the control of text storage as well as text presentation. WPF provides an extensible text formatting engine for this purpose.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐