title: Why is my WPF Command not firing?
body: <p>I have this XAML:</p>
  
  <pre><code>&lt;UserControl x:Class="Foo.UserControls.Bar"
               x:Name="FooBar"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
  
      &lt;StackPanel&gt;
          &lt;WrapPanel Margin="4,0,0,0"&gt;
              &lt;Button Command="{Binding Path=CreateCommand, ElementName=FooBar}"&gt;
                  &lt;TextBlock&gt;Create&lt;/TextBlock&gt;
              &lt;/Button&gt;
  </code></pre>
  
  <p>with this code-behind (removed <code>using</code>s):</p>
  
  <pre><code>namespace Foo.UserControls
  {
      public partial class Bar : UserControl
      {
          public DelegateCommand CreateCommand { get; private set; }
  
          public Bar()
          {
              InitializeComponent();
  
              CreateCommand = new DelegateCommand(Create);
          }
  
          private void Create(object action)
          {
              Console.WriteLine("foo");
          }
      }
  }
  </code></pre>
  
  <p>Both with debugger and console logging, it doesn't seem to ever fire. The odd thing is that the binding seems to be just fine, because it does not log any errors to the output. If I purposely break the binding I do get a binding error, but with the above binding I do not get any errors yet it never fires.</p>