title: Enable drag/drop and reordering after long click on GridView control (XAML)
body: <p>I'm using the Items Page template from the Windows 8.1 Windows Store Apps templates in XAML. The page features a large GridView control with multiple item elements.</p>
  
  <p>I would like to enable the dragging and reordering of items, but only after a user long clicks one of the items (similar to how it's done on the Windows Tablet Start menu and the iOS/Android home screen).</p>
  
  <p>I've tried binding to the <code>Holding</code> event and enabling <code>CanDragItems</code> and <code>CanReorderItems</code>, but the user cannot start dragging the item during the <code>Holding</code> event.</p>
  
  <p>Here's the GridView definition:</p>
  
  <pre><code>&lt;GridView
          x:Name="itemGridView"
          AutomationProperties.AutomationId="ItemsGridView"
          AutomationProperties.Name="Items"
          TabIndex="1"
          Grid.RowSpan="2"
          Padding="116,136,116,46"
          ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
          SelectionMode="None"
          IsSwipeEnabled="False"
          IsItemClickEnabled="True"
          CanReorderItems="False"
          AllowDrop="False"
          CanDragItems="False" 
          ItemClick="itemGridView_ItemClick"
          &gt;
  </code></pre>
  
  <p>With this in the code behind:</p>
  
  <pre><code>void OnHolding(object sender, HoldingRoutedEventArgs e)
      {
          if( e.HoldingState == Windows.UI.Input.HoldingState.Started)
          {
              Debug.WriteLine("Drag Start");
              itemGridView.CanDragItems = true;
              itemGridView.IsSwipeEnabled = true;
              itemGridView.CanReorderItems = true;
              itemGridView.AllowDrop = true;
          }
          else
          {
              Debug.WriteLine("Drag End");
              itemGridView.CanDragItems = false;
              itemGridView.IsSwipeEnabled = false;
              itemGridView.CanReorderItems = false;
              itemGridView.AllowDrop = false;
          }
      }
  </code></pre>
  
  <p>Thanks!</p>