none
请教TextBlock中文本的对齐问题 RRS feed

答案

  • 您好 jxk,

    我记得TextBlock的TextAlignment属性有一个枚举值是两端对齐。您可以参考下面的xaml:

    <TextBlock TextAlignment="Justify" Text="我是一个中国人" Width="200"/>
    

    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    2010年8月23日 8:39
    版主

全部回复

  • 您好 jxk,

    我记得TextBlock的TextAlignment属性有一个枚举值是两端对齐。您可以参考下面的xaml:

    <TextBlock TextAlignment="Justify" Text="我是一个中国人" Width="200"/>
    

    Aland Li


    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    2010年8月23日 8:39
    版主
  • 没有效果哦,还是左对齐。

    2010年9月4日 16:12
  • wpf中支持Justify但是只对英文有效,对中文没有效果。。。
    • 已建议为答案 yhnbgfd 2016年2月25日 8:15
    2013年8月28日 8:32