This documentation is archived and is not being maintained.

How to: Animate a Blur Visual Effect

The following example shows how to animate the Radius property of the BlurBitmapEffect to make the Button become blurry after it is clicked.

<Page xmlns=""
  xmlns:x="" >


    <Button  Width="200">
      Click to Blur ME!

        <!-- This BitmapEffect is targeted by the animation. -->
        <BlurBitmapEffect x:Name="myBlurBitmapEffect"  Radius="0" />

        <EventTrigger RoutedEvent="Button.Click">

              <!-- Blur the Button and then animate back to normal. -->
               From="0" To="40" Duration="0:0:0.3"
               AutoReverse="True" />