c# - Adjust label fontsize -


i adjust label content dynamically; when text bigger adjust label fontsize fit in label space.

<label name="lblresult" content="0" margin="0,-1,-222,0" verticalalignment="top"        horizontalcontentalignment="right" verticalcontentalignment="bottom"        fontfamily="helvetica neue" foreground="white" background="black"        height="87" fontsize="63" rendertransformorigin="0.5,0.5" padding="9"        contentstringformat="{}{0:#,0}" fontweight="light" cliptobounds="true" /> 

thank you

the wpf viewbox control grow / shrink contents available space:

http://www.wpftutorial.net/viewbox.html

just place label within viewbox:

<viewbox stretch="uniform">     <label name="lblresult" content="moez rebai" verticalalignment="top"    horizontalcontentalignment="right" verticalcontentalignment="bottom"    fontfamily="helvetica neue" foreground="white" background="black"    height="87" fontsize="63" rendertransformorigin="0.5,0.5" padding="9"    contentstringformat="{}{0:#,0}" fontweight="light" cliptobounds="true" /> </viewbox> 

of course, viewbox typically scaled container, idea!


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -