I'm tryi开发者_运维技巧ng to make a textblock control with a fixed size (height and width) in a window using Expression Blend, but the content of the textblock will be changed programatically, so I want the text to be viewed by the largest possible font size without going outside the size of the rectangle.
How to do that?
Rather than changing the font size, use a ViewBox
- WPF Tutorial. It seems to be better equipped for what you are trying to achieve as it gives the control within it the ability to resize indefinitely to the size of the area in which you place it.
精彩评论