Is it possible, that the FontSize getting smaller if I shrink the window and getting bigger if I enlarge the window?
+2
A:
I've never tried this, but I imagine you can bind the font size property of your text to the window size through a converter method. I wouldn't try to bind directly, as that way madness lies.
The other option would be to handle the window resize events and send the font size to each control manually...
--edit-- Just searched Google and found this result, which may be what you want.
ZombieSheep
2010-01-15 13:57:57
Unhappily the converter was written in C#. But I'm programming with Visual Basic and I've problems to rewrite it in vb. But I think it isn't very difficult to program an own converter.
elr
2010-01-15 14:27:45
+4
A:
Wrap your text inside a Viewbox
.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Viewbox>
<TextBlock Text="Sizes to fit!"/>
</Viewbox>
</Window>
CannibalSmith
2010-01-15 13:59:39
Now its gettings smaller if i shrink the window but FontSize="16" haven't any effect. From default, the font is very big.
elr
2010-01-15 14:25:46
Yes, of course. If you wish to impose limits, play with the `StretchDirection` property of `Viewbox`.
CannibalSmith
2010-01-15 14:52:47