I'm creating a touchscreen-optimized application. There are quite large buttons with labels inside of them. Generally, the text size should fit to the space the buttons provides, because this application needs to deal with different display resolutions.
I've achieved this effect by using a ViewBox as parent control. But this is still ugly, because each buttons text is of different size.
I would like to specify some kind of "DisplayedCharacters"-Property. I did this by using a custom class which displays a fxed number of characters and centered the text inside. But that still isn't perfect, when the charcater count is uneven.
Is there any other way I can go fo开发者_JAVA百科r?
Here are the Microsoft Surface design guidelines for typography: http://msdn.microsoft.com/en-us/library/ff318626(v=Surface.10).aspx
To answer your specific question, pick a font size that fits well with all your buttons. Don't use different sizes on different buttons. Font size indicates to users what is most important - this rarely correlates with string lengths.
More important than text is iconography. Supplement the labels on each button with appropriate icons. These will help users quickly and intuitively decide what to press without a lot of reading or thinking - a far more effective way of achieving your touch usability goals than any textual enhancements you could come up with.
I think you should do it other way around. Instead of resizing font, you resize the control. WPF and Silverlight layout system is specificaly designed for this case and if you design your layout correctly, the whole UI will change depending on text and content of your controls.
精彩评论