using System.Windows.Media.Effects; //Activate drop shadow effect on a control DropShadowEffect shadowEffect = new DropShadowEffect(); shadowEffect.Color = Colors.Black; shadowEffect.Opacity = 0.5; shadowEffect.ShadowDepth = 5; myControl.Effect = shadowEffect;
using System.Windows.Media.Effects; //Activate blur effect on image BlurEffect blurEffect = new BlurEffect(); blurEffect.Radius = 10; myImage.Effect = blurEffect;In this example, the BlurEffect is applied to the 'myImage' object with a specific blur radius value. Both examples use the Effect Activate method to apply a specific effect on a control or image. The package library used in both examples is System.Windows.Media.Effects.