【问题标题】:Alignment issues with flow document reader - WPF流文档阅读器的对齐问题 - WPF
【发布时间】:2015-05-18 13:00:55
【问题描述】:

我正在尝试将 .txt 文件加载到流文档阅读器中,但列未正确对齐,即列之间没有统一的间距。如何在流文档中获得与记事本文件中相同的对齐方式。我的意思是我想保留给定行中连续单词之间的间距,因为它存在于原始 .txt 文件中。有什么建议吗?

【问题讨论】:

    标签: wpf xaml expression-blend blend flowdocument


    【解决方案1】:

    您必须使用Monospaced font 来实现这一点。

    <FlowDocument FontFamily="Courier"/>
    

    【讨论】:

    • “Courier”不起作用,但我尝试了“Lucida Console”,现在对齐正确。非常感谢! :-)
    猜你喜欢
    • 2013-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-06
    • 1970-01-01
    • 2013-03-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多