title: Hold Event Longlistselector
body: <p>Hej </p>
  
  <p>I want to create a standard holdevent. When you hold an element, there would appear some options you could chose like a new list.</p>
  
  <p>How do you create this, is it just simply done with a popup or is there a smarter way?</p>
  
  <p><strong>Extra</strong></p>
  
  <p>After finding the answer, see answer below, some nice info is:</p>
  
  <p>Put the context creation inside the hold event.
  Then you can change to different contextmenus depending on the item. You can get the item that was holded by the following </p>
  
  <pre><code>    private void StackPanel_Hold(object sender, GestureEventArgs e)
      {
          ItemViewModel itemViewModel = (sender as StackPanel).DataContext as ItemViewModel;
          string t = itemViewModel.LineOne;
      }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>    &lt;ListBox x:Name="MainListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}" &gt;
  &lt;ListBox.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;StackPanel Margin="0,0,0,17" Height="78" Hold="StackPanel_Hold"&gt;
              &lt;TextBlock Text="{Binding LineOne}" /&gt;
              &lt;TextBlock Text="{Binding LineTwo}" /&gt;
          &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>A good link for easy implementation is also youtube link below, replicated here : 
  <a href="http://www.youtube.com/watch?v=q3YtFVe5bnE" rel="nofollow">Youtube</a></p>