title: How should one propagate events from one ViewModel to another ViewModel in MVVW?
body: <p>I'm brand new to the MVVW pattern, so you'll have to forgive me if I'm asking a very basic question.</p>
  
  <p>I have two ViewModels, we'll call them TreeViewViewModel and ListViewViewModel. TreeViewViewModel binds to an IsSelected property in its view. Whenever IsSelected changes, I need to inform ListViewViewModel so that it can update it's view.</p>
  
  <p>After some research online, I've come across the EventAggregator which looks like it might be a good solution.</p>
  
  <p>Is this the right solution? If so, how should I go about implementing this? Or, is there a better solution I should be considering? Below is a simplified version of how I think the EventAggregator might be integrated into the ViewModel publishing the event.</p>
  
  <pre><code>public class TreeViewViewModel : INotifyPropertyChanged
  {
      public bool IsSelected
      {
          get { return _isSelected; }
          set
          {
              if (value == _isSelected)
                  return;
  
              _isSelected = value;
  
              OnPropertyChanged("IsSelected");
  
              // Is this sane?
              _eventAggregator.GetEvent&lt;TreeViewItemSelectedEvent&gt;().Publish(value);
          }
      }
  
      protected virtual void OnPropertyChanged(string propertyName)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  }
  </code></pre>