开发者

How to reuse Word wrap algorithm in textbox?

开发者 https://www.devze.com 2023-03-17 05:33 出处:网络
I know TextBox/TextBlock already support text word wrap very well. (Windows WPF) the question is how can I开发者_C百科 reuse that logic? so I don\'t need to write an other word wrap util class for th

I know TextBox/TextBlock already support text word wrap very well. (Windows WPF)

the question is how can I开发者_C百科 reuse that logic? so I don't need to write an other word wrap util class for this purpose.

Any feedback would be great appericated!


Algorithms to do this have been around for ages and are relatively simple. You'd be a lot better off using one of the standard algorithms rather than trying to duct-tape something to a textbox. Try the wikipedia page for starters: Word Wrap

0

精彩评论

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

关注公众号