title: blocked UI in MVVM
body: <p>i am trying to build an application, following MVVM strategy. unfortunately my primitive example (please see below) is blocking the UI, although i specifically called for dispatcher. not sure why.. any suggestions?</p>
  
  <pre><code>class ViewModel : INotifyPropertyChanged
  {
      private readonly Dispatcher _dispatcher;
  
      private string _name;
  
      public ViewModel()
      {
          _dispatcher = Dispatcher.CurrentDispatcher;
      }
  
      public string Name
      {
  
          get { return _name; }
          set
          {
              _name = value;
              InvokePropertyChanged("Name");
          }
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void InvokePropertyChanged(string propertyName)
      {
          var e = new PropertyChangedEventArgs(propertyName);
          PropertyChangedEventHandler changed = PropertyChanged;
          if (changed != null)
              changed(this, e);
      }
  
      public void send()
      {
          Action dispAc = () =&gt; NameAsync();
          _dispatcher.BeginInvoke(dispAc);
      }
  
      private void NameAsync()
      {
          Name = "name1";
          Thread.Sleep(5000);
      }
  }
  </code></pre>
  
  <p>ps.
  the first reply clarified a problem, thanks. for those of you, who does not use 4.5, i use</p>
  
  <pre><code>Task.Factory.StartNew(dispatchAction);
  </code></pre>
  
  <p>rest is the same.</p>