TextBlock TextWrapping not wrapping

前端 未结 4 550
野趣味
野趣味 2020-12-10 00:48

When I place a TextBlock inside of a Horizontally Aligned StackPanel it does not wrap. I realize that this is because the available width of the StackPanel is PositiveInfini

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 01:20

    If you were like me and was wondering why the Textblock was still not wrapping after defining a Width.

    Try adding a MaxWidth to the Textblock with same same value as Width,

    This stops the control from growing in Width once the application has started.

    Hope this helps!

提交回复
热议问题