In a UWP app, is it possible to use the size and font of some text to calculate how big a TextBox would need to be to hold that text without scrolling?
This could be useful in designing an overall layout -- depending on the size of the TextBox, one might switch to a different configuration.
I'm going to be doing all this in code, not in xaml, as my app is cross-platform, and its graphical layout brains are in the platform-independent part.
If knowing the size is not possible, even knowing either of its dimensions would be nice, if that is possible.
Try this:
It is not the perfect solution but may fit.
You just create somewhere off the screen textBlock and follow its size.
XAML has only 1 Grid x:Name="MainGrid"