I would like a reusable function that simply does a BlurEffect on any particular valid Control type.
e.g.
var animation = new DoubleAnimation
{
From = 0,
To = 8,
Duration = new TimeSpan(0, 0, 0, 2),
AutoReverse = true
};
control.Effect = new BlurEffect();
// How to cycle the From and To on the Blur Radius?
I am uncertain how to dynamically create an animation in code behind to make this possible.
This article shows how to define an animation and story board in code.
You’d need to add the BlurEffect and use RadiusProperty of blureffect instead of RotateTransform.AngleProperty like this:
-edit-
I see now that you’re using Silverlight, not wpf (where Effect implements IAnimatable)
i’ll try and find a solution for silverlight
-edit2-
Have you seen/tried this? Msdn also has a sample for silverlight
-edit3-
Your direction got me towards the right answer which is as follows:
It should be noted that Silverlight does not make animations as easy as WPF, but in the end this can be done.