title: problem with wpf command not executing when button clicked
body: <p>I have the following XAML in a WPF application. I would like to bind the button to an <code>ICommand</code> in a view model. For some reason, I am not able to see the command from my view.
  this is in a user control.</p>
  
  <pre><code>&lt;Grid&gt;
  &lt;Grid.DataContext&gt;
          &lt;Binding 
              x:Name="SettingsData"
              Path="Data" /&gt;
      &lt;/Grid.DataContext&gt;
  .
  .
  .
  &lt;DockPanel Grid.Column="1"&gt;
              &lt;Button x:Name="SaveButton" 
                      DockPanel.Dock="Top"  
                      Height="25"  
                      HorizontalAlignment="Left" 
                      Margin="70 0 0 0"
                      Command="{Binding Path=SaveData}"
  
                      &gt;Save Changes&lt;/Button&gt;
          &lt;/DockPanel&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Here is my ICommand object - </p>
  
  <pre><code>public ICommand SaveData
  {
      get
      {
          if (_saveData == null)
          {
              _saveData = new RelayCommand(
                  param =&gt; this.saveData(),
                  param =&gt; true
                  );
          }
          return _saveData ;
      }
  }
  </code></pre>
  
  <p>Does anyone have any idea why I cannot bind to this command?</p>
  
  <p>Thanks for any thoughts....</p>