TextWraping属性,"Wrap"是换行,NoWrap是不换行

 

TextBlock控件内可以放置很多控件,不光是文字

<TextBlock TextWraping="Wrap">
    <Button>Split</Button>
    <CheckBox>across</CheckBox>
    <TextBox>multiple</TextBox>
    lines
</TextBlock>

 

设置TextAlignment="Left"/Right/Center/Justify属性,可以控制TextBlock中文本对齐方式,Justify是居中对齐。

相关文章:

  • 2022-02-07
  • 2021-12-05
  • 2021-11-17
  • 2022-12-23
  • 2021-08-31
  • 2021-06-24
  • 2021-11-17
猜你喜欢
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-05-20
  • 2021-12-15
相关资源
相似解决方案