title: Update ViewModel if Model changed
body: <p>How can i update view model when model change. First solution that i found was subscribe in ViewModel for PropertyChangedEvent of Model. But is it good way? Maybe it exist better way to Notify ViewModel?</p>
  
  <p>Xaml:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition/&gt;
              &lt;RowDefinition/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Label Grid.Row="0" Content="{Binding SomeValue}"/&gt;
          &lt;Label Grid.Row="1" Content="{Binding Second}"/&gt;
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>namespace WpfApplication
  {
  /// &lt;summary&gt;
  /// Interaction logic for MainWindow.xaml
  /// &lt;/summary&gt;
  public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
          DataContext = new ViewModel();
      }
  }
  public class ViewModel : INotifyPropertyChanged
  {
      Model model = new Model();
      public ViewModel()
      {
          model.PropertyChanged += (o, e) =&gt;
          {
              PropertyChanged(this, new PropertyChangedEventArgs(e.PropertyName));
          };
      }
      public int SomeValue
      {
          get
          {
              return this.model.SomeValue;
          }
  
          set
          {
              this.model.SomeValue = value;
          }
      }
  
      public int Second
      {
          get
          {
              return this.model.Second;
          }
  
          set
          {
              this.model.Second = value;
          }
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  }
  
  public class Model : INotifyPropertyChanged
  {
      private int someValue;
  
      public int SomeValue
      {
          get
          {
              return this.someValue;
          }
  
          set
          {
              this.someValue = value;
              this.RaisePropertyChanged("SomeValue");
          }
      }
  
      private int second;
  
      public int Second
      {
          get
          {
              return this.second;
          }
  
          set
          {
              this.second = value;
              this.RaisePropertyChanged("Second");
          }
      }
  
      public Model()
      {
          Action Test = new Action(WorkAsync);
          IAsyncResult result = Test.BeginInvoke(null,null);
      }
  
      public void WorkAsync()
      {
          while(true)
          {
              System.Threading.Thread.Sleep(3000);
              SomeValue += 1;
              Second += 1;
              RaisePropertyChanged("SomeValue");
          }
      }
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void RaisePropertyChanged(string info)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(info));
          }
      }
  }
  }
  </code></pre>