title: Blending a WPF Window with the desktop
body: <p>Is it possible (and how) to adjust the blending mode used to display a WPF form on the desktop?</p>
  
  <p>I have a window that serves as an overlay for the entire screen.  Here's the XAML:</p>
  
  <pre><code>&lt;Window x:Class="RedGreenBarsWPF.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="Red/Green Overlay" Topmost="True" Height="300" Width="525" AllowsTransparency="True" WindowStyle="None" Background="Transparent" WindowStartupLocation="Manual" IsHitTestVisible="False"&gt;
      &lt;Canvas Name="canvas" /&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>It can't be clicked, and it gets resized and moved to cover the entire screen when the Window loads.  I then draw some shapes on the canvas like this:</p>
  
  <pre><code>System.Windows.Media.Brush red = new SolidColorBrush(System.Windows.Media.Color.FromArgb(200, 255, 0, 0));
  
  System.Windows.Size s = new System.Windows.Size(System.Windows.SystemParameters.PrimaryScreenWidth, System.Windows.SystemParameters.PrimaryScreenHeight);
  
  int lines = 20;
  for (double i = 0; i &lt; s.Width; i += s.Width / lines)
  {
      System.Windows.Shapes.Rectangle rect = new System.Windows.Shapes.Rectangle
      {
          Width = s.Width / lines,
          Height = s.Height
      };
  
      rect.Fill = red;
  
      Canvas.SetTop(rect, 0);
      Canvas.SetLeft(rect, i * 2);
      canvas.Children.Add(rect);
  }
  </code></pre>
  
  <p>This does exactly what it should, but not what I want.  Here's a visualization done in Photoshop (mine looks like "Normal"):</p>
  
  <p><img src="https://i.stack.imgur.com/0KJYH.png" alt="enter image description here"></p>
  
  <p>I need to figure out a way to make it look like the red box on the right, where the text isn't lightened by the overlaying colour.  I've searched high and low, and although there are libraries out there that can accomplish this with elements within the Window, I need the blend mode to extend over the entire desktop.  How can this be done?</p>