WPF中的自定义文本换行

前端之家收集整理的这篇文章主要介绍了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.

原文链接:https://www.f2er.com/html/226960.html

猜你在找的HTML相关文章