wpf - how to add effect for text box to style -
i'm trying add effect style in order reuse it, reason doesnt work...
<style x:key="numerictextboxstyle" targettype="{x:type textbox}"> <style.resources> <textbox.effect x:key="effectstyle"> <dropshadoweffect blurradius="56" direction="392" color="#ff872e2e" renderingbias="quality"/> </textbox.effect> </style.resources> <setter property="height" value="25"/> <setter property="width" value="120"/> <setter property="horizontalalignment" value="right"/> <setter property="verticalalignment" value="top"/> <setter property="textalignment" value="center"/> </style>
but how add style part ? (also how declare effect ?)
thanks
try add effect setter instead
<style x:key="numerictextboxstyle" targettype="{x:type textbox}"> <setter property="effect"> <setter.value> <dropshadoweffect blurradius="56" direction="392" color="#ff872e2e" renderingbias="quality"/> </setter.value> </setter> <setter property="height" value="25"/> <setter property="width" value="120"/> <setter property="horizontalalignment" value="right"/> <setter property="verticalalignment" value="top"/> <setter property="textalignment" value="center"/> </style>
or if want have effect resource in style can this
<style x:key="numerictextboxstyle" targettype="{x:type textbox}"> <style.resources> <dropshadoweffect x:key="dropshadoweffect" blurradius="56" direction="392" color="#ff872e2e" renderingbias="quality"/> </style.resources> <setter property="effect" value="{staticresource dropshadoweffect}"/> <!--...--> </style>
Comments
Post a Comment