title: How to bind WPF button to a command in ViewModelBase?
body: <p>I have a view <code>AttributeView</code> that contains all sorts of attributes. There's also a button that when pressed, it should set the default values to the attributes. I also have a <code>ViewModelBase</code> class that is a base class for all ViewModels I have.
  The problem is I can't seem to get the button bound to the command with WPF.</p>
  
  <p>I've tried this, but it just doesn't do anything:</p>
  
  <pre><code>&lt;Button Command="{Binding DataInitialization}" Content="{x:Static localProperties:Resources.BtnReinitializeData}"&gt;&lt;/Button&gt;
  </code></pre>
  
  <p>The command is defined (in the <code>ViewModelBase</code>) like this:</p>
  
  <pre><code>public CommandBase DataInitialization { get; protected set; }
  </code></pre>
  
  <p>and on application startup a new instance is created for the command:</p>
  
  <pre><code>DataInitialization = new DataInitializationCommand()
  </code></pre>
  
  <p>However, the WPF binding doesn't seem to "find" the command (pressing the button does nothing). The ViewModel used in the current view is derived from the <code>ViewModelBase</code>. What else I can try (I'm quite new to WPF so this might be a very simple question)?</p>