title: c# surface device and pressure input
body: <p>i'm developing a simple application for a Windows Surface device (i have correctly installed the SDK v 2.0 and the runtime).
  I'm developing the application on my laptop and then deploing it on the surface devia simpy via USB (i report this to give more information but i don't think the issue comes from here).</p>
  
  <p>I've created a default project in WPF using the Surface template given via VisualStudio 2010 (even if i'm editing with VS 2012) and added some test</p>
  
  <pre><code>    public SurfaceWindow1()
      {
          InitializeComponent();
  
          // Add handlers for window availability events
          AddWindowAvailabilityHandlers();
  
          var Dev = Stylus.CurrentStylusDevice;
          Console.WriteLine(Dev != null ? Dev.ToString() : "null");
          Console.WriteLine(Dev != null ? Dev.TabletDevice.Type.ToString() : "null");
  
          StylusDown += new StylusDownEventHandler(SurfaceWindow1_StylusDown);
          MouseDown += new MouseButtonEventHandler(SurfaceWindow1_MouseDown);
          TouchDown += new EventHandler&lt;TouchEventArgs&gt;(SurfaceWindow1_TouchDown);
  
      }
  
      void SurfaceWindow1_StylusButtonDown(object sender, StylusButtonEventArgs e)
      {
          Console.WriteLine("Stylus");
      }
  
      void SurfaceWindow1_TouchDown(object sender, TouchEventArgs e)
      {
          Console.WriteLine("Touch");
      }
  
      void SurfaceWindow1_MouseDown(object sender, MouseButtonEventArgs e)
      {
          Console.WriteLine(e.StylusDevice == null ? "-" : e.StylusDevice.Name);
          Console.WriteLine("Mouse");
      }
  
      void SurfaceWindow1_StylusDown(object sender, StylusDownEventArgs e)
      {
          Console.WriteLine("Stylus");
      }
  </code></pre>
  
  <p>Obviusly when running on my laptop the output at each mous click is the following</p>
  
  <p>-
  Mouse</p>
  
  <p>So it's correcly using the right event (MouseDown).</p>
  
  <p>The problem is the following: the output showed above is the same when i launch it on the Surface Device even if i press the screen with the Pen an not with the mouse pad integrated in the small keybord.  Furthermore if i press with the finger none of the tree event are raised (i expected that the Touch will be raised).</p>
  
  <p>There's something i'm missing or doing it wrong?
  Thanks in advice.</p>
  
  <p>Additional info: as i said i'm developing in visual studio 2012 with .Net 4.5 and Windows 7. The Surface Device run a win 8.1 os </p>