title: Refreshing Label content every second WPF
body: <p>I'm trying to refresh a label content every second. So I define two methods as below. I use <code>startStatusBarTimer()</code> in my constructor of <code>Window</code>.</p>
  
  <p>codes:</p>
  
  <pre><code>private void startStatusBarTimer()
  {
      System.Timers.Timer statusTime = new System.Timers.Timer();
  
      statusTime.Interval = 1000;
  
      statusTime.Elapsed += new System.Timers.ElapsedEventHandler(statusTimeElapsed);
  
      statusTime.Enabled = true;
  }
  
  private void statusTimeElapsed(object sender, ElapsedEventArgs e)
  {
      lblNow.Content = DateTime.Now.ToString("yyyy/MM/dd");      
  }
  </code></pre>
  
  <p>But I get this error:</p>
  
  <p><em>The calling thread cannot access this object because a different thread owns it.</em></p>
  
  <p>What is wrong? Or What can I do?</p>