Max UI element size on Windows Phone

If you plan to use a TextBlock control to display large text files, be aware that the maximum viewable size of the control is 2048 x 2048 pixels.  That being said, if the text file extends beyond that 2048px range, the control will “expand” to that size, but the area beyond 2048px will not be visible.  So basically, your UI will probably be distorted or improperly rendered.

It’s probably best not to be displaying such large text files in a single control, anyway.  If you’re consuming a data feed of some kind (RSS?) and can’t control the length of the feed items, then you can use MaxHeight and TextTrimming properties on your TextBlock control, to adjust the viewable size, and to a lesser degree, presentation of the text.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s