title: How to create a semi transparent window in WPF that allows mouse events to pass through
body: <p>I am trying to create an effect similar to the Lights out /lights dim feature in Adobe Lightroom (<a href="http://www.youtube.com/watch?v=87hNd3vaENE" rel="noreferrer">http://www.youtube.com/watch?v=87hNd3vaENE</a>) except in WPF.</p>
  
  <p>What I tried was to create another window over-top of my existing window, make it transparent and put a semi transparent Path geometry on it.  But I want mouse events to be able to pass through this semi transparent window (on to windows below).  </p>
  
  <p>This is a simplified version of what I have:  </p>
  
  <pre><code>&lt;Window x:Class="LightsOut.MaskWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      AllowsTransparency="True" 
      WindowStyle="None"
      ShowInTaskbar="False"
      Topmost="True" 
      Background="Transparent"&gt;
  
  &lt;Grid&gt;
  
      &lt;Button HorizontalAlignment="Left" Height="20" Width="60"&gt;click&lt;/Button&gt;
  
      &lt;Path IsHitTestVisible="False" Stroke="Black" Fill="Black" Opacity="0.3"&gt;
  
          &lt;Path.Data&gt;
              &lt;RectangleGeometry Rect="0,0,1000,1000 "/&gt;
          &lt;/Path.Data&gt;
      &lt;/Path&gt;             
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>The window is fully transparent, so on places where the Path doesn't cover, mouse events pass right through.  So far so good.  The IsHitTestvisible  is set to false on the path object.  So mouse events will pass through it to other controls on the same form (ie you can click on the Button, because it is on the same form).  </p>
  
  <p>But mouse events wont pass through the Path object onto windows that are below it.</p>
  
  <p>Any ideas?  Or better ways to solve this problem?</p>
  
  <p>Thanks. </p>