How to increase height limit of the TextBlock control in Windows Phone

后端 未结 2 734
刺人心
刺人心 2021-01-16 02:39

I need to create a view with multiple TextBlocks populating thousands words. Unfortunately, when I set the Text of the TextBlock to contain a string longer than approx. 2000

相关标签:
2条回答
  • 2021-01-16 03:31

    This is a limitation of the TextBox implementation on Windows Phone. If the area is larger thatn 2048 x 2048 it gets clipped.

    This blog post has a workaround.

    0 讨论(0)
  • 2021-01-16 03:32

    No UIElement can be greater than 2048 pixels in either dimension, however, if you exceed this limit, the space for the larger element is still reserved.

    As a workaround, see this blog post which has a simple technique for splitting text into multiple TextBlocks.

    0 讨论(0)
提交回复
热议问题