wpf - Measure Maximum Fontsize for a control -
lets have 5 textblocks on screen each same size.
i have 5 items display (of varying length)
- 10
- 100
- 1111
- 99
- 9192
is there way wpf calculate largest fontsize usable textblocks text fit in it's respective textblock, fontsizes same?
use viewbox
<viewbox> <stackpanel> <textblock text="10"/> <textblock text="100"/> <textblock text="1111"/> </stackpanel> </viewbox>
then inside viewbox scale fit size available viewbox, regardless of font size.
Comments
Post a Comment