Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blur background in WPF

Tags:

c#

.net

wpf

effects

I am trying to create a blur effect in WPF, but I want to blur the content located behind the control (such as a Grid), I do not intend to blur the contents of the Grid.

I want to do something like this image.

enter image description here

like image 857
migueladanrm Avatar asked Jan 11 '15 04:01

migueladanrm


1 Answers

If you are looking for something like this:

blur cherries

The answer is to use a BitmapEffect :

<Image Source="http://www.pingminghealth.com/wp-content/uploads/2010/12/cherries.jpg" Stretch="UniformToFill">
    <Image.BitmapEffect>
        <BlurBitmapEffect Radius="20" />
    </Image.BitmapEffect>
</Image>

You can find a tutorial about it on msdn: How to Apply a Blur Effect to a Visual.

like image 93
aloisdg Avatar answered Sep 16 '22 19:09

aloisdg