title: Binding on DependencyProperty of custom User Control not updating on change
body: <p>I'm having difficulties with databinding on my custom user control (s). I created an example project to highlight my problem. I'm completely new to WPF and essentially MVVM as well, so bear with me...</p>
  
  <p>I created a simple view that uses databinding two ways. The databinding on the built-in control works just fine. My custom control doesn't... I put a breakpoint in the <code>PropertyChangedCallback</code> of my control. It gets hit once on startup, but then never again. Meanwhile, the label I have bound to the same value is happily counting down.</p>
  
  <p>What am I missing? My example project follows:</p>
  
  <p>The main window:</p>
  
  <pre><code>&lt;Window x:Class="WpfMVVMApp.MainWindow"
          xmlns:local="clr-namespace:WpfMVVMApp"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid&gt;
          &lt;Grid.DataContext&gt;
              &lt;local:CountdownViewModel /&gt;
          &lt;/Grid.DataContext&gt;
          &lt;Label Name="custName" Content="{Binding Path=Countdown.ChargeTimeRemaining_Mins}" Height="45" VerticalAlignment="Top"&gt;&lt;/Label&gt;
          &lt;local:UserControl1 MinutesRemaining="{Binding Path=Countdown.ChargeTimeRemaining_Mins}" Height="45"&gt;&lt;/local:UserControl1&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>Here's my model:</p>
  
  <pre><code>namespace WpfMVVMApp
  {
  
      public class CountdownModel : INotifyPropertyChanged
      {
          private int chargeTimeRemaining_Mins;
          public int ChargeTimeRemaining_Mins
          {
              get
              {
                  return chargeTimeRemaining_Mins;
              }
              set
              {
                  chargeTimeRemaining_Mins = value;
                  OnPropertyChanged("ChargeTimeRemaining_Mins");
              }
          }
  
          #region INotifyPropertyChanged Members
          public event PropertyChangedEventHandler PropertyChanged;
          private void OnPropertyChanged(string propertyName)
          {
              if (PropertyChanged != null)
                  PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
          }
          #endregion 
      }
  }
  </code></pre>
  
  <p>The ViewModel:</p>
  
  <pre><code>namespace WpfMVVMApp
  {
      public class CountdownViewModel
      {
          public CountdownModel Countdown { get; set; }
  
          DispatcherTimer timer;
          private const int maxMins = 360;
  
          public CountdownViewModel()
          {
              Countdown = new CountdownModel { ChargeTimeRemaining_Mins = 60 };
  
              // Setup timers
              timer = new DispatcherTimer();
              timer.Tick += new EventHandler(this.SystemChargeTimerService);
              timer.Interval = new TimeSpan(0, 0, 1);
              timer.Start();
          }
  
          private void SystemChargeTimerService(object sender, EventArgs e)
          {
              //convert to minutes remaining
              // DEMO CODE - TODO: Remove
              this.Countdown.ChargeTimeRemaining_Mins -= 1;
          }
      }
  }
  </code></pre>
  
  <p>Here's the XAML for my user control:</p>
  
  <pre><code>&lt;UserControl x:Class="WpfMVVMApp.UserControl1"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               mc:Ignorable="d" 
               d:DesignHeight="300" d:DesignWidth="300"&gt;
      &lt;Grid&gt;
          &lt;Label Name="Readout"&gt;&lt;/Label&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>And here's the code behind the user control:</p>
  
  <pre><code>namespace WpfMVVMApp
  {
      public partial class UserControl1 : UserControl
      {
          #region Dependency Properties
          public static readonly DependencyProperty MinutesRemainingProperty =
                      DependencyProperty.Register
                      (
                          "MinutesRemaining", typeof(int), typeof(UserControl1),
                          new UIPropertyMetadata(10, new PropertyChangedCallback(minutesRemainChangedCallBack))
                      );
          #endregion
  
          public int MinutesRemaining
          {
              get
              {
                  return (int)GetValue(MinutesRemainingProperty);
              }
              set
              {
                  SetValue(MinutesRemainingProperty, value);
              }
          }
  
          static void minutesRemainChangedCallBack(DependencyObject property, DependencyPropertyChangedEventArgs args)
          {
              UserControl1 _readout = (UserControl1)property;
              _readout.MinutesRemaining = (int)args.NewValue;
  
              _readout.Readout.Content = _readout.MinutesRemaining;
          }
  
          public UserControl1()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>