title: Binding Empty Value
body: <p>Why doesn't the PropertyChangedEvent get fired when I have an empty value for a <code>DatePicker</code> in Silverlight?</p>
  
  <p>Here's my example XAML</p>
  
  <pre><code>&lt;UserControl x:Class="ValidationExamples.MainPage"
      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:ig="http://schemas.infragistics.com/xaml" 
      xmlns:controls='clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls'
      mc:Ignorable="d"
      d:DesignHeight="300" d:DesignWidth="400"&gt;
  
      &lt;Grid x:Name="LayoutRoot" Background="White"&gt;
          &lt;StackPanel&gt;
              &lt;controls:DatePicker Height="20" Width="100"  x:Name="DatePicker" SelectedDate="{Binding Path=DOB, Mode=TwoWay}"/&gt;
              &lt;Button Height="20" Width="100" Click="Button_Click" Content="Break"/&gt;
          &lt;/StackPanel&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>public partial class MainPage : UserControl
  {
      private Model MyModel;
  
      public MainPage()
      {
          InitializeComponent();
          this.MyModel = new Model();
          this.MyModel.DOB = DateTime.Now;
          this.DataContext = this.MyModel;
      }
  
      private void Button_Click(object sender, RoutedEventArgs e)
      {
            // Empty on purpose
      }
  }
  </code></pre>
  
  <p>My Model Code (As you can see I tried <code>Nullable&lt;DateTime&gt;</code> and <code>DateTime</code>):</p>
  
  <pre><code>public class Model : INotifyPropertyChanged
  {
      private Nullable&lt;DateTime&gt; dob;
      public Nullable&lt;DateTime&gt; DOB
      {
          get
          {
              return this.dob;
          }
          set
          {
              this.dob = value;
              NotifyPropertyChanged("DOB");
          }
      }
  
      //private DateTime dob;
      //public DateTime DOB
      //{
      //    get
      //    {
      //        return this.dob;
      //    }
      //    set
      //    {
      //        this.dob = value;
      //        NotifyPropertyChanged("DOB");
      //    }
      //}
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void NotifyPropertyChanged(string property)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(property));
          }
      }
  }
  </code></pre>