title: Opening context menu just above item in win 8 metro app
body: <p>I have a list of items defined in a ListView. When user click or tap any item, I want to show a PopupMenu just above the selected Item. How should I position the PopupMenu? </p>
  
  <pre><code>varmenu =newPopupMenu();
  menu.Commands.Add(
  newUICommand("Remove", (x) =&gt;
  {...
  // Create the message dialog and set its content
  }, 1));
  
  var chosenCommand     =awaitmenu.ShowForSelectionAsync(GetElementRect((FrameworkElement)sender));
  
  Rect GetElementRect(FrameworkElement element)
  {    
      GeneralTransform buttonTransform = element.TransformToVisual(null);
      Pointpoint = buttonTransform.TransformPoint(newPoint());
      returnnewRect(point,newSize(element.ActualWidth, element.ActualHeight));
  }
  </code></pre>