Enable Glass Effect to your WPF Apps

15 08 2007

After playing with WPF and MacDock :D, I thought let me make it easier for my friends to enable the Glass Transparency in their WPF Apps and thus I have written a library which you can use in your WPF application 😉

Download the library with source code from here

To use this library in you application, add the library using Add Reference Wizard into your Project.

using ExtendGlass;
ExtendGlassFrame extendGlass = new ExtendGlassFrame();
protected override void OnSourceInitialized(EventArgs e)
     bool ret=extendGlass.Extend(this, new Thickness(-1));

Its easy isnt it 😀

Remember that we have to paint the window and that can be done only in the OnSourceInitialized function

Please do leave your comment regarding how it works for you 🙂




8 responses

27 08 2007

Hello mate,
That’s totally awesome.
It works like a charm.
You forgot to mention on the post to create an instance of ExtendGlass before using that code inside the box. 🙂

29 08 2007

Hi Godwin, thanks for the comment 🙂

I do have this line in my post :),

using ExtendGlass;
ExtendGlassFrame extendGlass = new ExtendGlassFrame();

Is that something different you are mentioning that I have missed here ?

27 11 2007
Web design and development blog

Thanks mate! Gunna try and get this working now.
Downloading Linq first.

14 08 2008


looks very nice!

how can i make it work with vb.net

5 10 2009

Hi Chakkaradeep,

I would like to say thanks for this post.

It helped me a lot. This looks great.

Once again Ton’s of thanks.

From sagar.

5 05 2010

It works perfectly!
Thanks Chaks

30 10 2011

Thanks a lot man, looks awesome! 😉

28 07 2013
Axl Hazarika

Hi there, You’ve done a great job. I will certainly digg it and personally suggest to my friends. I am sure they’ll be benefited
from this web site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: