I have failed to find a Windows Runtime equivalent to the following WPF code to measure the width of a string:
FormattedText formattedText = new FormattedText(in_string,in_culture,in_flowdir,in_font,in_sz,in_color);
string_width = formattedText.WidthIncludingTrailingWhitespace);
Does anybody know if it can be done in Metro?
It is possible, I've found one method that gives useful measurements, but I am not sure it is the best way of doing it:
My gut feeling is that there are situations in which this code will give an unexpected result.
Try this: