This documentation is archived and is not being maintained.

BitmapEffectGroup Class

Represents a group of BitmapEffect objects that is used to apply multiple effects to a visible object.

Namespace:  System.Windows.Media.Effects
Assembly:  PresentationCore (in PresentationCore.dll)

public sealed class BitmapEffectGroup : BitmapEffect

The order in which effects are added to a group affects the final visual representation of the content that the effects are applied to. The effects are chained so that the visual of the first effect is used as the source of the second. This logic is followed through all subsequent effects within the effect group. The following image shows the effect that a DropShadowBitmapEffect and a OuterGlowBitmapEffect have when added to a Button. The first button has the drop shadow applied first and the outer glow applied last. In the second button, the order is reversed.

Effects in a BitmapEffectGroup

Affect of an effect's order in a BitmapEffectGroup

Multiple visual effects can be applied to a single visible object using the BitmapEffectGroup. The following example shows how to apply a BlurBitmapEffect and a DropShadowBitmapEffect to create a blurry button with a shadow behind it.

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Effects;

namespace SDKSample
    public partial class MultipleEffectExample : Page
        public MultipleEffectExample()
            Button myButton = new Button();
            myButton.Content = "DropShadow under this Button";
            myButton.Margin = new Thickness(50);
            myButton.Width = 300;

            // Create the BitmapEffects to apply to the button.
            BlurBitmapEffect myBlurBitmapEffect = new BlurBitmapEffect();
            myBlurBitmapEffect.Radius = 2;

            DropShadowBitmapEffect myDropShadowBitmapEffect = new DropShadowBitmapEffect();
            myDropShadowBitmapEffect.Color = Colors.Black;
            myDropShadowBitmapEffect.Direction = 320;
            myDropShadowBitmapEffect.ShadowDepth = 30;
            myDropShadowBitmapEffect.Softness = 1;
            myDropShadowBitmapEffect.Opacity = 0.5;

            BitmapEffectGroup myBitmapEffectGroup = new BitmapEffectGroup();

            myButton.BitmapEffect = myBitmapEffectGroup;

            StackPanel myStackPanel = new StackPanel();
            this.Content = myStackPanel;

<Page xmlns=""


    <Button Margin="50" Width="300">
      DropShadow Under this Button
          <BlurBitmapEffect Radius="2" />
          <DropShadowBitmapEffect Color="Black" Direction="320" ShadowDepth="30" Softness="1" 



More Code

How to: Animate Multiple Visual Effects The following example shows how to animate the ShadowDepth and Softness properties of a DropShadowBitmapEffect and the Radius property of a BlurBitmapEffect to create the illusion of a button rising up from the screen.
How to: Animate an Effect within a BitmapEffectGroup This example demonstrates how to animate a BitmapEffect within a BitmapEffectGroup.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0