5

It's easy for a WPF application to make parts of a window transparent or semi-transparent. But how to I apply the current Vista theme (colors, opacity) to these transparent parts?

When I have a green glass border how will I get a green glass background of the same style?

Is it even possible to do this without calls to the Windows API?

I am thinking of something like this

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
TalkingCode
  • 13,407
  • 27
  • 102
  • 147
  • Isn't that the color of the background, that is making its mark? And not the theme color? – MartinHN Mar 11 '09 at 09:34
  • @MartinHN The theme adds a tint to the glass but the background will still show through depending on how transparent the glass is supposed to be in the theme. – Bryan Anderson Dec 04 '09 at 20:39

3 Answers3

4

Here's a nice example:

CodeProject: Adding Glass Effect to WPF using Attached Properties

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Stefan
  • 43,293
  • 10
  • 75
  • 117
0

Here's the official documentation on extending the Aero glass effect in your WPF app:

http://msdn.microsoft.com/en-us/library/ms748975.aspx

RandomEngy
  • 14,931
  • 5
  • 70
  • 113
0

Take a look at this link, look for the section titled "IE7 – Extending the glass frame":

http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx

Nir
  • 29,306
  • 10
  • 67
  • 103