title: Implement a Command Object that changes a property on my viewmodel
body: <p>I am trying to learn WPF/MVVM and for educational reason I create a simple application. I have some issues trying to implement a <code>Command Object</code>.</p>
  
  <p>When a button control is clicked I want the background color of the Grid change to yellow using a <code>Command Object</code>. There are a lot of stuff about how to do this, but I want to do it with the clean way. Generally I want to achieve a loose coupling between <code>View</code>, <code>ViewModel</code> and the <code>Command Object</code> in order to test those classes.</p>
  
  <p>Also i do not want to use some Libraries like <code>Prism</code> because I have the need to fully understand MVVM first.</p>
  
  <p>I have a code sample but of course it does not have functionality. Just represented it for convenience  reason.</p>
  
  <p>My view XAML</p>
  
  <pre><code>&lt;Window x:Class="Calendar.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:local="clr-namespace:Calendar"
      mc:Ignorable="d"
      Title="MainWindow" Height="350" Width="480"&gt;
  
  &lt;Grid Background="{Binding BackgroundColour}" Margin="0,0,2,0"&gt;
      &lt;Button Margin="197,247,200,-239" Grid.Row="3" Grid.ColumnSpan="2" Command="{Binding SubmitCommand}"&gt;Color&lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>My ModelView class</p>
  
  <pre><code>public class MainWindowViewModel : INotifyPropertyChanged {
  
      //Command part
      ICommand SubmitCommand;
      public MainWindowViewModel(ICommand command) {
          SubmitCommand = command;
      }
  
      //Data Binding part
      public event PropertyChangedEventHandler PropertyChanged;
      private Brush backgroundColour = (Brush)new BrushConverter().ConvertFromString("Red");
      public Brush BackgroundColour {
          get { return this.backgroundColour; }
          set {
              if (value != this.backgroundColour) {
                  this.backgroundColour = value;
                  var handler = this.PropertyChanged;
                  if (handler != null) {
                      handler(this, new PropertyChangedEventArgs("BackgroundColour"));
                  }
              }
          }
  </code></pre>
  
  <p>(it also has a data binding part but it does not have to do with my issue)</p>