title: InvokeRequired in wpf
body: <p>I used this function in a <code>Windows forms</code> application:</p>
  
  <pre><code>delegate void ParametrizedMethodInvoker5(int arg);
  
  private void log_left_accs(int arg)
  {
      if (InvokeRequired) 
      {
          Invoke(new ParametrizedMethodInvoker5(log_left_accs), arg);
          return;
      }
  
      label2.Text = arg.ToString();
  }
  </code></pre>
  
  <p>But in <code>WPF</code> it doesn't work. Why?</p>