wpf controls - An integer value in WPF Resources? -


is possible set integer value in wpf control resources?!

<usercontrol.resources>      <solidcolorbrush x:key="mylinebrush" color="lightgreen" />      ??? <integer x:key="mystrokethickness" value="2" /> ???       <style targettype="local:myline" x:key="mylinestylekey">              <setter property="stroke"              value="{dynamicresource mylinebrush}"/>          <setter property="strokethickness"              value="{dynamicresource mystrokethickness}"/>      </style> 

in order modify dynamically mylinebrush , mystrokethickness values...

to make declaration need import system namespace:

xmlns:sys="clr-namespace:system;assembly=mscorlib" 

...

<sys:int32 x:key="myvalue">1234</sys:int32> 

note: need use double wpf properties instead of int32


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -