title: WPF: Problem with taking command handlers out of code behind
body: <p>I have some command binding defined in my XAML:</p>
  
  <pre><code>&lt;UserControl.CommandBindings&gt;
      &lt;CommandBinding 
          Command="commands:Commands.GrantAccessCommand"
          Executed="HelpExecuted" /&gt;
  &lt;/UserControl.CommandBindings&gt;
  </code></pre>
  
  <p>So GrantAccessCommand is located in a seperate class called Commands and HelpExecuted is in my code behind. It works fine. Now when I put HelpExecuted in the other class as well I get an error "...HelpExecuted' is not a valid event handler method name.  Only instance methods on the generated or code-behind class are valid." The code:</p>
  
  <pre><code>Executed="commands:Commands.HelpExecuted"
  //I also tryed: Executed="x:Static commands:Commands.HelpExecuted"
  </code></pre>
  
  <p>I know I can do this in code behind using CommandBindings.Add(new CommandBinding(GrantAccessCommand, HelpExecuted)); But I want to do this using XAML</p>
  
  <p>Is there a way?</p>