Is there any workaround to apply more then one Effect on one UIElement
in WPF?
e.g.
<Button Content="Blurred (Radius=2)">
<Button.Effect>
<BlurEffect Radius="2"></B开发者_C百科lurEffect>
</Button.Effect>
</Button>
Thanks in advance.
You can wrap the UIElement
in, say, a Border
, and apply the additional effect to the Border
.
<Border>
<Border.Effect>
<DropShadowEffect/>
</Border.Effect>
<Button Content="Blurred (Radius=2)">
<Button.Effect>
<BlurEffect Radius="2"></BlurEffect>
</Button.Effect>
</Button>
</Border>
Perhaps you might be interested in the BitmapEffectGroup:
<Button Content="Blurred (Radius=2)">
<Button.Effect>
<BitmapEffectGroup>
<BlurEffect Radius="2"></BlurEffect>
</BitmapEffectGroup>
</Button.Effect>
</Button>
精彩评论