title: Is there a way to touch-enable scrolling in a WPF ScrollViewer?
body: <p>I'm trying to create a form in a WPF application that will allow the user to use iPhone-like gestures to scroll through the available fields. So, I've put all my form controls inside a StackPanel inside a ScrollViewer, and the scrollbar shows up as expected when there are too many elements to be shown on the screen.</p>
  
  <p>However, when I try to test this on my touch-enabled device, a panning gesture (placing a finger down on the surface and dragging it upward) does not move the viewable area down as I would expect.</p>
  
  <p>When I simply put a number of elements inside a ListView, the touch gestures work just fine. Is there any way to enable the same kind of behavior in a ScrollViewer?</p>
  
  <p>My window is structured like this:</p>
  
  <pre><code> &lt;Window x:Class="TestTouchScrolling.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"&gt;
  &lt;Grid&gt;        
      &lt;ScrollViewer Name="viewer" VerticalScrollBarVisibility="Auto"&gt;
          &lt;StackPanel Name="panel"&gt;
              &lt;StackPanel Orientation="Horizontal"&gt;
                  &lt;Label&gt;Label 1:&lt;/Label&gt;
                  &lt;TextBox Name="TextBox1"&gt;&lt;/TextBox&gt;
              &lt;/StackPanel&gt;
              &lt;StackPanel Orientation="Horizontal"&gt;
                  &lt;Label&gt;Label 2:&lt;/Label&gt;
                  &lt;TextBox Name="TextBox2"&gt;&lt;/TextBox&gt;
              &lt;/StackPanel&gt;
              &lt;StackPanel Orientation="Horizontal"&gt;
                  &lt;Label&gt;Label 3:&lt;/Label&gt;
                  &lt;TextBox Name="TextBox3"&gt;&lt;/TextBox&gt;
              &lt;/StackPanel&gt;
  
              &lt;!-- Lots more like these --&gt;
  
          &lt;/StackPanel&gt;
      &lt;/ScrollViewer&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>