Scale text in WPF
How can I automatically scale text inside a control based on the control's size but always make sure it's readable 开发者_开发技巧(that is, I want the font size stays between 9pt and 30pt)
The ViewBox can help with this, but I'm not sure about keeping the font size within a range. You can probably accomplish this roughly with MinHeight
and MinWidth
.
Try to use ScaleTransform. In order to understand how to calculate the scale size you may refer to http://social.msdn.microsoft.com/forums/en-US/wpf/thread/d73c9eb2-9c68-428d-b99b-d23d0c62c095/
精彩评论