23.3. Nonrectangular Windows
Irregularly shaped windows are often the trademark of cutting-edge consumer applications such as photo editors, movie makers, and MP3 players, and they're even more common with WPF applications.
Creating a basic shaped window in WPF is easy. However, creating a slick, professional-looking shaped window takes more work—and, most likely, a talented graphic designer to create the outlines and design the background art.
23.3.1. A Simple Shaped Window
The basic technique for creating a shaped window is to follow these steps:
Set the Window.AllowsTransparency property to true.
Set the Window.WindowStyle property to None to hide the nonclient region of the window (the blue border). If you don't, you'll get an InvalidOperationException ...
Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.