title: my wpf menuitem commands don't trigger
body: <p>I'm working with WPF and MVVM.</p>
  
  <p>I created my dynamic <code>Menu</code> two different ways, but both don't work.</p>
  
  <p>First:</p>
  
  <pre><code>&lt;DockPanel&gt;
      &lt;Menu DockPanel.Dock="Top" Height="auto" ItemsSource="{Binding MeuPaudi}"&gt;
          &lt;Menu.Resources&gt;
              &lt;Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"&gt;
                  &lt;Setter Property="Command" Value="{Binding Path=MenuSelecionado}" /&gt;
                  &lt;Setter Property="Header" Value="{Binding Texto}" /&gt;
                  &lt;Setter Property="ItemsSource" Value="{Binding MenuFilhos}"/&gt;
              &lt;/Style&gt;
          &lt;/Menu.Resources&gt;
      &lt;/Menu&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>Second:</p>
  
  <pre><code>&lt;Menu ItemsSource="{Binding MeuPaudi}"&gt;
      &lt;Menu.ItemContainerStyle&gt;
          &lt;Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}"&gt;
              &lt;Setter Property="Header" Value="{Binding Path=Texto}"/&gt;
              &lt;Setter Property="IsCheckable" Value="{Binding Path=IsCheckable}"/&gt;
              &lt;Setter Property="ItemsSource" Value="{Binding Path=MenuFilhos}"/&gt;
              &lt;Setter Property="Command"  Value="{Binding MenuSelecionado}" /&gt;
          &lt;/Style&gt;
      &lt;/Menu.ItemContainerStyle&gt;
  &lt;/Menu&gt;
  </code></pre>
  
  <p>I also create a <code>Button</code> to test if the command works properly:</p>
  
  <pre><code>&lt;Button Command="{Binding Path=MenuSelecionado}"/&gt;
  </code></pre>
  
  <p>And it works. Can someone help me?</p>