title: WPF : Accessing a UI object with a Thread gives an error
body: <p>I have a function that is called when a file is modified in a folder. This function updates the items of a listview which is stored in the UI.</p>
  
  <p>Here is the function : </p>
  
  <pre><code>Private Sub FileChangeNotify()
      Try
          LstMoulures.Items.Refresh()
      Catch ex As Exception
          MsgBox(Ex.exception)
      End Try
  
  End Sub
  </code></pre>
  
  <p>Here is the error: "Le thread appelant ne peut pas accéder à cet objet parce qu'un autre thread en est propriétaire." (Translation : The calling thread cannot access this object because it is owned by another thread)</p>
  
  <p>Thanks.</p>