0

Is there any way to set one specific color to be transparent for the whole WPF window?

3 Answers 3

5

You don't need to. Transparency in WPF doesn't work using mask colors like in Winforms- just set the background to Transparent, and AllowsTransparency to true. If you want different shaped windows, you can use the technique described here: http://devintelligence.com/2007/10/shaped-windows-in-wpf/

Sign up to request clarification or add additional context in comments.

Comments

4

We can make a transparent WPF window by using a XAML like follows.

<Window x:Class="SeeThru.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="SeeThru" Height="300" Width="300" WindowStyle="None" AllowsTransparency="True" Background="Transparent"> ...... </Window> 

Comments

0

No. WPF supports alpha-channel transparency, not bitmap mask transparency.

There are people who have attempted to work around this, but only on a per-image basis.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.