Thursday, July 30, 2009

Drop Shadow on MouseEnter in Silverlight 3

Silverlight 3 has made it really simple now.
Go explore other effects too, they're all in the same namespace.
  1. using System.Windows.Media.Effects;  

  1. MouseEnter += delegate  
  2. {  
  3.   Effect = new DropShadowEffect  
  4.   {  
  5.     Color = Colors.Black,  
  6.     BlurRadius = 13,  
  7.     ShadowDepth = 3  
  8.   };  
  9. };  
  10. MouseLeave += delegate  
  11. {  
  12.   Effect = null;  
  13. };  

No comments:

Post a Comment