title: How to get selected list view item for context menu click event
body: <p>I need help to get Selected list view item details, when context menu assigned to list view items is clicked.</p>
  
  <pre><code> &lt;ListView.Resources&gt;
      &lt;ContextMenu x:Key="GvRowMenu" ItemsSource="{Binding ContextMenuItems}"&gt;
          &lt;ContextMenu.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;Image  Source="{Binding IconPath}"&gt;&lt;/Image&gt;
                      &lt;TextBlock  Text="{Binding Name}"&gt;&lt;/TextBlock&gt;
                      &lt;MenuItem 
                          Click="MenuItem_Click"
                          CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=DataContext.RunCommand}" /&gt;
  </code></pre>
  
  <p>This is a click event code</p>
  
  <pre><code>private void MenuItem_Click(object sender, RoutedEventArgs e)
      {
          //what needs to de here?
      }
  </code></pre>
  
  <p>I wrote this piece of code in my view model, but it doesnt trigger on execute method</p>
  
  <pre><code>RunCommand = new DelegateCommand&lt;object&gt;(OnRunCommand, CanRunCommand);
  
  private void OnRunCommand(object obj)
      {
          // use the object here...
      }
  
      private bool CanRunCommand(object obj)
      {
          return true;
      }
  </code></pre>
  
  <p>Let me know, how can I handle this situation. Any examples related to same will be appreciated.</p>
  
  <p>Thanks</p>