I realize what I'm doing is probably pretty silly, but I'm in the middle of learning WPF and would like to know how to do this.

I have a window with a listbox on it. The listbox is being used to deliver status messages about the program while it's running. For example "Server started" "New connection at IP #" etc. I wanted this to be constantly updating in the background, so I spawned a new thread for handling updating this, but when I made the call to add an item I get the error message "The calling thread cannot access this object because a different thread owns it."

Any idea how I can update the listbox from another thread? Or in the background, etc.

Edit
Report