c# - Template for Control Effect -
I was wondering if there was a way to create a template for an effect, so I applied it to all its controls In this way if I had the effect of being modified, then I would have to change it only in one place ...
Assume that I have:
Lt; Button content = "foo" height = "50" width = "50" & gt; & Lt; Button.Effect & gt; & Lt; Drop Shadow Effective Blur Radius = "10" Color = "Black" Opacity = "0.5" Shadow = "0" /> & Lt; /Button.Effect> & Lt; / Button & gt;
I would like (I know this is not correct):
& lt; UserControl.Resources & gt; & Lt; Effect x: key = "myfact" & gt; & Lt; Drop Shadow Effective Blur Radius = "10" Color = "Black" Opacity = "0.5" Shadow = "0" /> & Lt; / Effects & gt; & Lt; /UserControl.Resources>
...
& lt; Button content = "foo" height = "50" width = "50" effect = "{StaticResource MyEffect}" />
Is there any way to do something like this?
Just give a key to DropShadowEffect
& Lt; /UserControl.Resources>
Comments
Post a Comment