title: DirectX DirectInput won't detect connected devices
body: <p>I'm trying to use a joystick in my C# WPF application using directX (using Microsoft.DirectX.DirectInput;), but for some odd reason I keep getting an error in the first line where I try to detect all the connected devices.  All I have in my application so far is the following line of code in the contructor:</p>
  
  <p>DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly);</p>
  
  <p>The error is as follows:</p>
  
  <p>Error type: XamlParseException was unhandled.</p>
  
  <p>Error Message: "The invocation of the constructor on type 'JoystickTest.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'."</p>
  
  <p>I'm working off this example I found online: <a href="http://www.codeproject.com/KB/directx/joystick.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/directx/joystick.aspx</a></p>
  
  <p>My current setup is WPF, C#, .NET 4.0, and Windows 7 64-bit</p>