title: use string value of mvvm message as variable in viewmodel
body: <p>I'm filtering a listcollectionview in viewModel 1 based on selectionchanged of datagrid in viewModel 2. To do this I use mvvm messaging. Each time the selection of the datagrid changes a message is send to update my listcollectionview. This all works well.</p>
  
  <p>Now I need to use the string value of this message to pass into the filter. The problem is that I can only use the string value in the updateShotList method but not into the bool IsMatch. How can I make this work, or how can I use the string value of the message as a variable in my viewmodel.</p>
  
  <p>This is how my viewmodel looks like.</p>
  
  <pre><code>private ObservableCollection&lt;Shot&gt; _allShots = new ObservableCollection&lt;Shot&gt;();
  public ObservableCollection&lt;Shot&gt; AllShots
      {
          get { return _allShots; }
          set { _allShots = value; RaisePropertyChanged();}
      }
  
  private ListCollectionView _allShotsCollection;
  public ListCollectionView AllShotsCollection
      {
          get
          {
              if (_allShotsCollection == null)
              {
                  _allShotsCollection = new ListCollectionView(this.AllShots);
              }
             return _allShotsCollection;
          }
          set
          {
              _allShotsCollection = value; RaisePropertyChanged();
          }
     }
  
  private void UpdateShotList(string SceneNr) // value sceneNr comes from message from viewmodel 2
      {
          _allShotsCollection.IsLiveFiltering = true;
          _allShotsCollection.Filter = new Predicate&lt;object&gt;(IsMatchFound);
      }
  
      bool IsMatchFound(object obj)
      {
  =====&gt;  if (obj as Shot != null &amp;&amp; (obj as Shot).SceneNumber == "?????") // Here I need the value of string ScenNr that comes from the message.
          {
              return true;
          }
          return false;
      }
  
      public ShotListViewModel()
      {
          Messenger.Default.Register&lt;string&gt;(this, "UpdateShotList", UpdateShotList);
  
      }
  </code></pre>