I've just started to play with WPF.
Is it possible to have the size of the text of a Label or TextBlock size itself to fill it's parent container?
Thanks, Mark
I've just started to play with WPF.
Is it possible to have the size of the text of a Label or TextBlock size itself to fill it's parent container?
Thanks, Mark
You can use a ViewBox to visually zoom something to fit within its container. The other solutions here work, but they only stretch the control, not its content. The ViewBox will stretch both.
Depends on the parent container
Grid, DockPanel will stretch your control StackPanel, WrapPanel will leave it to the control to size itself..
Set HorizonalAlignment/VerticalAlignment to "stretch".
Use DockPanel as parent container