12.4. Transparency

Unlike many older user interface technologies (for example, Windows Forms), WPF supports true transparency. That means if you layer several shapes (or other elements) on top of one another and give them all varying levels of transparency, you'll see exactly what you expect. At its simplest, this feature gives you the ability to create graphical backgrounds that "show through" the elements you place on top. At its most complex, this feature allows you to create multilayered animations and other effects that would be extremely difficult in other frameworks.

12.4.1. Making an Element Partially Transparent

There are several ways to make an element semitransparent:

  • Set the Opacity property of your element. Every element, including ...

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.