views:

153

answers:

2

I'd like to have a label with a blur effect and a drop shadow effect.

A: 

If you use the older BitmapEffect, then you can make use of the BitmapEffectGroup:

<Label Content="Hello">
 <Label.BitmapEffect>
  <BitmapEffectGroup>
   <DropShadowBitmapEffect />
   <BlurBitmapEffect />
  </BitmapEffectGroup>
 </Label.BitmapEffect>
</Label>

BitmapEffect, however is being depreciated, and UIElement.Effect is the preferred method to add effects. To combine multiple behaviors into a Effect of this type, you will have to create a custom effect that does what you desire. As shown here, which will require more then just editing the elements through blend.

Also, take a look here: WPF Pixel Shader Effect Library They have some exelent examples and pre-built effects as well as good tutorial on how to create your own.

rmoore
A: 

It's a bit of a hack, but you could just wrap the label in a grid or border and apply the blur effect to that while applying the dropshadow to the label directly.

Ben Reierson