title: WPF: Multiple screens
body: <p>I'm writing a screensaver in WPF.  I have the screensaver working, however, it only displays on my main monitor.  Is there a way to "black out" or draw graphics to additional monitors when the user has multiple displays?  I've done some searching around, but haven't found anything relevant.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>From ananthonline's answer below, I was able to accomplish the "black out" effect on non-primary displays using the following window:</p>
  
  <pre><code>&lt;Window x:Class="ScreenSaver.BlackOut"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Cursor="None" WindowStyle="None" ResizeMode="NoResize" Background="Black"&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>and initializing one for each screen in <code>App.xaml.cs</code> using the following process:</p>
  
  <pre><code>foreach (Screen s in Screen.AllScreens)
  {
      if (s != Screen.PrimaryScreen)
      {
          BlackOut blackOut = new BlackOut();
          blackOut.Top = s.WorkingArea.Top;
          blackOut.Left = s.WorkingArea.Left;
          blackOut.Width = s.WorkingArea.Width;
          blackOut.Height = s.WorkingArea.Height;
          blackOut.Show();
      }
  }
  </code></pre>
  
  <p>Note an import to <code>System.Windows.Forms</code> is required to access the <code>Screen</code> class.</p>