title: WPF Listview does not scroll (with mouse wheel) when Application not in focus
body: <p>I have a WPF app (written in C#) which has a Listview control which scrolls perfectly with the mouse wheel when the app is in focus. 
  However when the app is not in focus, even when the mouse pointer is over the app &amp; list view area, the Listview does not scroll. I continue to see mousehover related effects on the app but no mousewheel event is received. This is inline with how most of the other apps work on my desktop however some of them (like Facebook messenger) support scrolling without focus which i would like to mimic in my WPF app.</p>
  
  <p>I have searched MSDN forums and Stackoverflow and seen multiple solutions for Windows Forms however they were questions asked over 5 years ago and i was wondering if someone has managed to do it relatively easily on .net 4.5 and can point me to possible solutions.</p>
  
  <p>---Edit---</p>
  
  <p>I was able to progress to some extent on this thanks to this thread <a href="https://stackoverflow.com/questions/87134/c-sharp-listview-mouse-wheel-scroll-without-focus?rq=1">C# ListView mouse wheel scroll without focus</a> </p>
  
  <p>Here is how my the function that receives the mousewheel looks</p>
  
  <pre><code>private static IntPtr HookCallback(
  int nCode, IntPtr wParam, IntPtr lParam)
  {
  if (nCode &gt;= 0 &amp;&amp;
  MouseMessages.WM_MOUSEWHEEL == (MouseMessages)wParam)
          {
              MSLLHOOKSTRUCT hookStruct = (MSLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));
              Console.WriteLine(hookStruct.pt.x + ", " + hookStruct.pt.y);
              Console.WriteLine((short)((hookStruct.mouseData)&gt;&gt;16));                
              MouseWheelEventArgs myArgs = new MouseWheelEventArgs(System.Windows.Input.Mouse.PrimaryDevice, (int)hookStruct.time, (short)((hookStruct.mouseData)&gt;&gt;16));
              myMainFrame.SidePanelControl.ScrollTheListView(myArgs);
              }
          return CallNextHookEx(_hookID, nCode, wParam, lParam);
      }
  </code></pre>
  
  <p>As you can see i am initializing a MouseWheelEventArgs instance and have the time, delta and the mouse device attributes. </p>
  
  <p>How do i go about passing this mousewheel event to my listview scrollviewer?</p>