c# - How to grow/shrink a TextBlock (Font Size) to the available space in WPF? -
i've seen question asked lot, however, opposite of i'm looking for. while other people want control size based on size of text, i'm trying figure out if there way grow size of text amount of space available.
take idea of digital clock window , want numbers stating time grow (or shrink) based on size of window clock in. if there isn't way automatically pointers programmatic way can accomplished?
the wpf viewbox control grow / shrink contents available space:
http://www.wpftutorial.net/viewbox.html
just place textblock within viewbox:
<viewbox stretch="uniform" width="50" height="50"> <textblock text="test" /> </viewbox>
of course, viewbox typically scaled container, idea!
Comments
Post a Comment