title: ViewModels Property after PropertyChanged event is always Null
body: <p>This is my first experience with C#, as well as .net in general.    I'm trying to get an understanding of MVVM and how it can work with a screen I want to build.  </p>
  
  <p>My button text is not updating when I am changing it after a different button is clicked.  The debugger is showing that even though the OnPropertyChanged function is getting called, the PropertyChanged is always null.</p>
  
  <p>I've looked at some documentation and taken a look at other posts of people asking similar questions but none of those solutions have worked for me.  I'm also looking for an explanation so I can understand what i'm doing wrong.</p>
  
  <p>Code:</p>
  
  <p>MonthViewPage.xaml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
       &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
               x:Class="Mobile_Release_POC_4.MonthViewPage" 
               xmlns:local="clr-namespace:Mobile_Release_POC_4;assembly=Mobile_Release_POC_4"
               xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
               xmlns:sys="clr-namespace:System;assembly=mscorlib"&gt;
  
              &lt;ContentPage.BindingContext&gt;
                   &lt;local:WeekViewDatesViewModel MiddleWeekViewDate='{x:Static sys:DateTime.Now}' /&gt;
              &lt;/ContentPage.BindingContext&gt;
  
              &lt;StackLayout&gt;
                 &lt;Label Text="Monday, April 27, 2015"
                 HorizontalOptions="Center"&gt;&lt;/Label&gt;
  
                 &lt;Grid Padding="0" ColumnSpacing="-2"&gt;
  
                       &lt;Grid.RowDefinitions&gt;
                             &lt;RowDefinition Height="75" /&gt;
                       &lt;/Grid.RowDefinitions&gt;
  
                       &lt;Grid.ColumnDefinitions &gt;
                            &lt;ColumnDefinition Width="50" /&gt;
                       &lt;/Grid.ColumnDefinitions&gt;
  
                       &lt;Button x:Name="monthViewDateButton1"
                            Text="{Binding MiddleWeekViewDate}"
                            FontSize="10"
                            Grid.Row="0"
                            Grid.Column="0"
                        /&gt;
                       &lt;Button x:Name="monthViewDateButton2"
                       Text="Tue 4/28"
                       FontSize="10"
                       Grid.Row="0"
                       Grid.Column="1"
                       Clicked="OnButtonClicked"
                       /&gt;
  
                 &lt;/Grid&gt;
  
  
           &lt;/StackLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>MonthViewPage.xaml.cs</p>
  
  <pre><code>using Xamarin.Forms;
  
  namespace Mobile_Release_POC_4
  {
  public partial class MonthViewPage : ContentPage
  {
      public MonthViewPage ()
      {
          InitializeComponent();
  
      }
  
  
      void OnButtonClicked(object sender , EventArgs args){
  
          WeekViewDatesViewModel dc = new WeekViewDatesViewModel ();
  
          dc.MiddleWeekViewDate = new DateTime (2014, 2, 2);
      }
  }
  </code></pre>
  
  <p>WeekViewDatesViewModel.cs</p>
  
  <pre><code>    namespace Mobile_Release_POC_4
  {
      public class WeekViewDatesViewModel : INotifyPropertyChanged
      {
          DateTime middleWeekViewDate;
  
  
          public event PropertyChangedEventHandler PropertyChanged;
  
  
          public DateTime MiddleWeekViewDate
          {
              set
              {
                  if (middleWeekViewDate != value)
                  {
                      middleWeekViewDate = value;
                      OnPropertyChanged("MiddleWeekViewDate");
                  }
              }
              get
              {
                  return middleWeekViewDate;
              }
          }
  
          protected void OnPropertyChanged(string propertyName)
          {
              var handler = PropertyChanged;
              if (PropertyChanged != null)
              {
                  PropertyChanged(this,
                      new PropertyChangedEventArgs(propertyName));
              }
          }
  
  
      }
  }
  </code></pre>
  
  <p>Thank you</p>