title: Command to call method from viewmodel
body: <p>OK, I tend to avoid using commands because they always manage to confuse the hell out of me, but I'm on a new project and am trying to architect it correctly with no code behind on my view.  Basically All I am trying to do right now is wire up a button that fires a command that does some things on my view model, and somehow something so simple is still giving me trouble.  I think I'm close but can't quite get there.  Here is what I have right now.</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;RoutedUICommand x:Key="GetMusic" /&gt;
  &lt;/Window.Resources&gt;
  &lt;Window.DataContext&gt;
      &lt;core:ViewMain /&gt;
  &lt;/Window.DataContext&gt;
  &lt;Window.CommandBindings&gt;
      &lt;CommandBinding Command="{StaticResource GetMusic}" Executed="GetMusicExecuted"/&gt;
  &lt;/Window.CommandBindings&gt;
  </code></pre>
  
  <p>And the view model is pretty much nothing right now</p>
  
  <pre><code>public class ViewMain
  {
      public MusicCollection Music { get; set; }
  
      private void GetMusicExecuted(object sender, ExecutedRoutedEventArgs e)
      {
          //Logic
      }
  }
  </code></pre>
  
  <p>Now what I'm trying to do is wire up this command I set up in my command bindings to just call my executed method in my view model, however it tries to find that method within view itself.  Is there a way I can direct it to the method in my view model instead, or a better way to set this up to accomplish the same thing?  Hoping to keep it simple at first so I don't blow my mind too early.</p>