title: WPF binding command to ContextMenu
body: <p>I have a problem with command binding in WPF. I have the following xaml:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Entity}" Name="Lst"&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;                    
                  &lt;Button  Content="qwerty" Command="{Binding ElementName=Lst, Path=DataContext.SaveCommand}" &gt;
                      &lt;Button.ContextMenu&gt;
                          &lt;ContextMenu&gt;                                
                              &lt;MenuItem Header="Send2" Command="{Binding ElementName=Lst, Path=DataContext.SaveCommand}" /&gt;
                          &lt;/ContextMenu&gt;
                      &lt;/Button.ContextMenu&gt;    
                  &lt;/Button&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>As you can see Button and its ContextMenu have the similar command-bindings. But when i click button its command is firing and when i click context menu's item its command isn't firing. Where am i wrong? Thanks in advance! </p>