开发者

Is it possible to get rendered text from textBlock

I have textBlock defined such that it fills the entire screen of the phone.

The textBlock is initialized with some data which cannot be displayed in the boundary and hence gets clipped.

I want to read the data which actually got rendered on the screen (i.e. whole data - clipped data).

Putting a breakpoint shows me that开发者_如何转开发 myNewTextBlock.Text contains the entire data that it was initialized with.

Thanks


You could look at using Measure and MeasureOverride to determine how much of the Text would fit in the available space.

You'll likely need to test various trimmed versions of the Text but it shouldn't be too tricky.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜