title: Notify MainWindow about change in other class
body: <p>I have class Client, which is receives data from Stream.</p>
  
  <p>Also I have MainWindow, which has ListBox.</p>
  
  <p>Basically I need to add item in ListBox when new data received. Please see codes (pay attention to TODO lines)</p>
  
  <pre><code>class Client
  {
      private TcpClient client;
      private NetworkStream stream;
      private ASCIIEncoding encoder;
      private Thread clientThread;
  
      public Client(string ip, int port)
      {
          this.client = new TcpClient(ip, port);
          this.stream = client.GetStream();
          this.encoder = new ASCIIEncoding();
  
          clientThread = new Thread(Receive);
          clientThread.Start();
      }
  
      public void Receive()
      {
          byte[] data = new byte[4096];
          int bytesRead;
  
          bytesRead = stream.Read(data, 0, 4096);
          string[] message = DecodeMessage(data, bytesRead);
          // TODO: Notify about new message
      }
  </code></pre>
  
  <p>Here is my MainWindow</p>
  
  <pre><code> public partial class MainWindow : Window
  {
      Client client;
  
      public MainWindow()
      {
          InitializeComponent();
          client = new Client("127.0.0.1", 2020);
      }
  
      public void updateChat(string[] message)
      {
          // TODO: Should add new messages into ListBox
      }
  
      private void send_Click(object sender, RoutedEventArgs e)
      {
          client.Send(0, this.messageBox.Text);
          this.messageBox.Clear();
      }
  }
  </code></pre>