0
votes

I am writing windows phone 8.1 silverlight app,

I have a Stackpanel in my XAML page, I want to create its background "Blur".

Is there any way to do it?

2

2 Answers

2
votes

There is no easy way to apply effects such as blur to elements. More typical would be to dim them by placing a partially transparent rectangle over the disabled element.

If you really want blur you would need to render the element to a bitmap, but the bitmap contents, and then place that image over the original element.

2
votes

If you have an image as background you could add the blurred effect by modifying the image before setting it as background. There's multiple libraries that allow you do to this eg. Win2D and Lumia Imaging SDK 2.0. They are both fairly simple to work with and have pro's and con's.

Nokia Imaging SDK allows you to work directly with bitmaps / writeablebitmaps while Win2D has a more smooth blur rendering. Here's a guide to how you can implement and work with both: http://www.blendrocks.com/code-blend/2015/1/29/implementing-image-blur-in-a-windows-universal-app