title: How to update UI in WPF application from thread?
body: <p>I'm writing a client/server application and I'm trying to update UI from a thread that contains an infinite loop, in order to perform Socket.Receive. When I receive a packet on the socket, I have to update the UI and continue with the loop. The problem is that the thread can't manage the UI, so I tried to call BeginInvoke inside the thread, but the result was that UI froze. Is there a simple procedure that allows to call BeginInvoke inside a thread and returns the control to UI? </p>