As suggested I allow all of my WPF UIElement
s to have a dynamic size so they can be resized easily however, in TextBlock
s I have to specify the size of the Font
. This means when the element's size increases or decreases the Font size stays the same. Is there a way for the Font
size to be dynamic?
Asked
Active
Viewed 5,920 times
5

Dave Clemmer
- 3,741
- 12
- 49
- 72

James
- 3,597
- 11
- 47
- 57
1 Answers
15
Try putting the text inside the control into a Viewbox
:
<Button>
<Viewbox>
<TextBlock>Text To Resize</TextBlock>
</Viewbox>
</Button>

Dave Clemmer
- 3,741
- 12
- 49
- 72

Simon
- 33,714
- 21
- 133
- 202