c# - preventing label border from being bold -
c# - preventing label border from being bold -
i using viewbox fill space available, kind of gives me right result not exactly.
<viewbox grid.row="0" grid.column="0"> <stackpanel name="letters" orientation="horizontal"> <label ..>...</label> ... </stackpanel> </viewbox>
when maintain adding labels stackpanel when exceed container width smaller.
it's behaviour want, don't want labels' border 'bold' (because of viewbox).
how should alter code structure?
i've modified kzen's reply ensure don't have explicitly define style in code every time add together new label stack panel. (warning: coding in-place, afaik, should compile fine is)
<viewbox grid.row="0" grid.column="0"> <stackpanel name="letters" orientation="horizontal"> <stackpanel.resources> <resourcedictionary> <style targettype="{x:type label}"> <setter property="borderthickness" value="0"/> <setter property="margin" value="0"/> <!-- not sure if want --> <setter property="padding" value="0"/> <!-- not sure if want --> </style> </resourcedictionary> </stackpanel.resources> <label></label> ... </stackpanel> </viewbox>
c# wpf
Comments
Post a Comment