title: UWP app not updating view
body: <p>A simple exercise: display the current time in a Textblock in an UWP app.
  I'm using MVVMlight and PropertyChanged.Fody.</p>
  
  <p>As a base for this example I'm using this <a href="https://stackoverflow.com/questions/34570755/how-to-display-a-clock-with-the-current-time-in-a-windows-core-iot-app">Article 1</a> article and the MVVMlight / Fody implementation from here: <a href="http://www.codingfreaks.de/2016/04/20/wpf-und-mvvm-richtig-einsetzen-teil-2/" rel="nofollow noreferrer">Article 2</a></p>
  
  <p>I've got a MainViewModel. Here I'm creating an instance of the DateTimeModel class and I've already added a Debug output if the property changed event is raised (working).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>using System.Diagnostics;
  using GalaSoft.MvvmLight;
  using Logic.Ui.Models.DateTime;
  using PropertyChanged;
  
  namespace Logic.Ui
  {
      public class MainViewModel : ViewModelBase, INotifyPropertyChanged
      {
  
          public DateTimeModel DateTimeModel;
  
          [DependsOn(nameof(DateTimeModel))]
          public DateTime CurrentDateTime =&gt; DateTimeModel.CurrentDateTime;
  
          public MainViewModel()
          {
              DateTimeModel = new DateTimeModel();
  
              DateTimeModel.PropertyChanged += (s, e) =&gt;
              {
                  Debug.WriteLine("DateTime PropertyChanged");
              };
          }
  
          #region Events
  
          public event PropertyChangedEventHandler PropertyChanged;
  
          #endregion
  
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And a DateTimeModel class where I update the Time using a ThreadPoolTimer:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>using System;
  using System.ComponentModel;
  using System.Diagnostics;
  using Windows.System.Threading;
  using Windows.UI.Core;
  
  namespace Logic.Ui.Models.DateTime
  {
  
      public class DateTimeModel : INotifyPropertyChanged
      {
          private ThreadPoolTimer _clockTimer;
  
          public System.DateTime CurrentDateTime { get; set; }
          
          public DateTimeModel()
          {
              _clockTimer = ThreadPoolTimer.CreatePeriodicTimer(ClockTimerTickAsync, TimeSpan.FromMilliseconds(1000));
          }
  
          private async void ClockTimerTickAsync(ThreadPoolTimer timer)
          {
              await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =&gt;
              {
                  CurrentDateTime = System.DateTime.Now;
                  Debug.WriteLine("Time updated");
              });
  
          }
  
          #region Events
  
          public event PropertyChangedEventHandler PropertyChanged;
  
          #endregion
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The XAML code looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Page
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:MirrorV2.Ui.Raspberry"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      x:Class="MirrorV2.Ui.Raspberry.MainPage"
      mc:Ignorable="d"
      DataContext="{Binding Main, Source={StaticResource Locator}}"&gt;
  
      &lt;Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&gt;
  
          &lt;TextBlock Text="{Binding CurrentDateTime}"/&gt;
          
      &lt;/Grid&gt;
  &lt;/Page&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem here is that the UI is not updated, while the propertyChanged events are beeing raised.
  What I'm missing here?</p>
  
  <p>EDIT: If I'm using CurrentDateTime as a standard property:</p>
  
  <pre><code>public DateTime CurrentDateTime { get; set; }
  </code></pre>
  
  <p>and assigning the current DateTime in the constructor the binding works.</p>
  
  <pre><code>CurrentDateTime = System.DateTime.Now;
  </code></pre>