WinFX/Avalon and transparent windows

April 5, 2006 00:58 by docbliny 

EDIT: Daniel reminded me I should update my blog once in an eternity. Please see his comment for RTM info:

This information is a bit dated.  With the RTM release, you can now do the following:

    Window window = new Window();
    window.AllowsTransparency = true;
    window.WindowStyle = WindowStyle.None;

This will create a borderless window that allows transparently.  Regarding software acceleration, you'll find this interesting:

- Daniel

Original outdated post:

Just a quick tip. If you've searched online for a way to make a transparent, borderless, or shaped window in WPF (formerly known as Avalon) and you've found the Win32 Interop method of HwndSource and UsesPerPixelOpacity, you might want to just switch to using a Popup with AllowsTransparency set to True. Just remember that currently (February 2006 CTP) this will mean that hardware acceleration won't be used (oh please, please, please add hardware support...)

Add comment

  Country flag

  • Comment
  • Preview