title: How to add a method to the ViewModel and firing the PropertyChanged event from there?
body: <p>I would need accommodate the scenario where I have something like a timer and want to have changed property values reflected in the UI at one moment in time (basically  I need Update the UI every x seconds). </p>
  
  <p>I need to know how to add a method to the ViewModel and firing the PropertyChanged event from there.</p>
  
  <pre><code>   namespace MyClient.Common
      {
          public abstract class BindableBase : INotifyPropertyChanged
          {
              public event PropertyChangedEventHandler PropertyChanged;
  
              protected bool SetProperty&lt;T&gt;(ref T storage, T value, /*[CallerMemberName]*/ String propertyName = null)
              {
                  if (object.Equals(storage, value)) return false;
  
                  storage = value;
                  this.OnPropertyChanged(propertyName);
                  return true;
              }
  
              protected void OnPropertyChanged(/*[CallerMemberName]*/ string propertyName = null)
              {
                  var eventHandler = this.PropertyChanged;
                  if (eventHandler != null)
                  {
                      eventHandler(this, new PropertyChangedEventArgs(propertyName));
                  }
              }
  
              public void CallOnPropertyChanged()
              {
                 // what to add here?
              }
  
          }
      }
  </code></pre>
  
  <p>App.xaml.cs</p>
  
  <pre><code>namespace MyClientWPF
  {
      /// &lt;summary&gt;
      /// Interaction logic for App.xaml
      /// &lt;/summary&gt;
      public partial class App : Application
      {
  
  
          private void DispatcherTimer_Tick(object sender, EventArgs e)
          {
              App._myDataSource.Load();
              App._myDataSource.CallOnPropertyChanged();
              // I need to rise OnPropertyChanged here
          }
  
          protected override void OnStartup(StartupEventArgs e)
          {
  
  
              // timer on the same thread
              System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
              dispatcherTimer.Tick += new EventHandler(DispatcherTimer_Tick);
              dispatcherTimer.Interval = new TimeSpan(0, 0, 20); // 10 seconds
              dispatcherTimer.Start();
  
              base.OnStartup(e);
          }
  
  
  
      }
  }
  </code></pre>