Cómo determinar la altura de línea de un cuadro de texto en píxeles en WinRT

How do I determine the height of the lines of a TextBox in pixels in WinRT?

With Windows Phone, I could get (or set) this value through TextBox.LineHeight, but this doesn't seem to be available to WinRT.

I can't work out how to do this, but I need to get the value so that I can set my padding and margins correctly in my layout. I'm trying to set the upper and lower padding to ((TextBox.Height - TextBox.LineHeight) / 2). Can anyone offer any suggestions?

preguntado el 12 de junio de 14 a las 10:06

From the sounds of it, there may be a better way all together to do what you're trying to do that wouldn't/shouldn't involve actively looking at lineheights to set margins/padding elsewhere. -

Could you provide an example? I'm trying to keep the active line in the middle of the screen through a combination of setting the padding and using ChangeView en ScrollViewer de la TextBox to center the active line. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.