Transparency is finally easily enabled in XAML

In Programming on 14 July, 2006 at 3:00 pm

With the release of the June CTP .NET Framework 3.0, transparent background and window with rounded corners can finally be easily tweaked in XAML.  Lauren Lavoie, from Microsoft, blog about how you can go about doing it.  The trick is in Window.AllowsTransparency, just set this property to “True” and then setting the Window.Background to “Transparent” will get you a transparent window.  With the whole background being transparent you can then achieve rounded-corner window by drawing a Border with a CornerRadius defined.  Below is a snippet of the XAML code that Lauren did:

and the result:
Don't forget to check out her blog.

Leave a Reply

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

You are commenting using your 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: