title: Making C# callbacks between different threads
body: <p>I working on a WPF GUI app that acts as socket server by using TcpListener class. TcpListener is configured to make an callback when data is received to the listened socket. However the problem is that TcpListener callback comes from another thread and causes following error when I try to touch GUI from the callback:</p>
  
  <p>"Cross-thread operation not valid: Control 'slider' accessed from a thread other than the thread it was created on."</p>
  
  <p>Any ideas how to solve this?</p>
  
  <p>I'm familiar with Qt where this would be done with signal/slot system that can send events to another threads. Is there similar functionality in C#?</p>