WinRt TextBlock with single space width

五迷三道 提交于 2019-12-25 02:25:32

问题


I'm trying to make a text on path element. To accomplish this I split original text to single characters and for each character create new TextBlock and count it's width after measurement. The problem is, that when a TextBlock contains only a single space it's width is 0, it seam's space is being trimmed. How do I prevent trimming spaces? Or maybe there's a better suggestion? Thanks a lot.


回答1:


If you want to place a space on path - you don't really need to display a TextBlock there. If you want to measure how much space a space should use [sic] - you can compare the width of something like "aa" and "a a".



来源:https://stackoverflow.com/questions/24388136/winrt-textblock-with-single-space-width

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!