title: WPF contextmenu and ListView
body: <p>Ok, hopefully this is simple but for some reason I can't find a straight answer and I'm not familiar enough with WPF yet to know how to do it.</p>
  
  <p>I have a listview, it gets bound to an observable collection of objects to display. I want to have a context menu with a bunch of options. The options in the context menu are relative to the particular object in the list that was clicked on (things like delete, export, etc).</p>
  
  <p>So I need the object that the user right clicked on in my listview to be passed as a parameter to the command that the context menu executes. </p>
  
  <p>How do I do this?</p>
  
  <p>Edit: I should mention I would prefer a solution that is mostly (if not entirely) xaml - I'm trying to avoid having significant code in the code-behind. If that's the only way to do it though...</p>
  
  <p><strong>Further Edit</strong>: More details that I forgot to mention that are important. The command I want executed is on the object bound to the data context of my user control, it is not on the objects in the list view. So I need the context menu's on the list view's items to be bound to a command that is on the user control's data context, and the listview item passed as a parameter into that command.</p>