title: 'using System.Windows.Interop;' where is it?
body: <p>I saw this code for shadows around borderless windows but here i my problem. <code>using System.Windows.Interop;</code> is underlined and i cant find it in references. Also in <code>public static void DropShadowToWindow(Window window)</code> this Window is underlined so i guess its linked to Interop...</p>
  <pre class="lang-cs prettyprint-override"><code>using System.Drawing.Printing;
  using System.Runtime.InteropServices;
  using System.Windows;
  using System.Windows.Interop;
  
  class DwmDropShadow
  {
      [DllImport(&quot;dwmapi.dll&quot;, PreserveSig = true)]
      private static extern int DwmSetWindowAttribute(
          IntPtr hwnd, int attr, ref int attrValue, int attrSize
      );
  
      [DllImport(&quot;dwmapi.dll&quot;)]
      private static extern int DwmExtendFrameIntoClientArea(
          IntPtr hWnd, ref Margins pMarInset
      );
  
      /// &lt;summary&gt;
      /// Drops a standard shadow to a WPF Window, even a borderess window.
      /// Only works with DWM (Vista and Seven).
      ///
      /// This is much more efficient than setting AllowsTransparency to true 
      /// and using the DropShadow effect, as AllowsTransparency will turn off
      /// acceleration for all the windows. (This is a huge performance issue.)
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;window&quot;&gt;Window to which the shadow will be applied&lt;/param&gt;
      public static void DropShadowToWindow(Window window)
      {
          if (!DropShadow(window))
          {
              window.SourceInitialized +=
                  new EventHandler(window_SourceInitialized);
          }
      }
  
      private static void window_SourceInitialized(object sender, EventArgs e)
      {
          Window window = (Window)sender;
  
          DropShadow(window);
  
          window.SourceInitialized -= new EventHandler(window_SourceInitialized);
      }
   
      /// &lt;summary&gt;
      /// The actual method that makes API calls to drop the shadow to the window
      /// &lt;/summary&gt;
      /// &lt;param name=&quot;window&quot;&gt;Window to which the shadow will be applied&lt;/param&gt;
      /// &lt;returns&gt;True if the method succeeded, false if not&lt;/returns&gt;
      private static bool DropShadow(Window window)
      {
          try
          {
              WindowInteropHelper helper = new WindowInteropHelper(window);
              int val = 2;
              int ret1 = DwmSetWindowAttribute(helper.Handle, 2, ref val, 4);
  
              if (ret1 == 0)
              {
                  Margins m = new Margins { 
                      Bottom = 0, Left = 0, Right = 0, Top = 0 
                  };
  
                  int ret2 = DwmExtendFrameIntoClientArea(helper.Handle, ref m);
                  return ret2 == 0;
              }
              else
              {
                      return false;
              }
          }
          catch (Exception ex)
          {
              // Probably dwmapi.dll not found (incompatible OS)
              return false;
          }
      }
  }
  </code></pre>