title: How can I update the UI when I use Thread.Sleep
body: <p>This is the function which I'm using:</p>
  
  <pre><code>    private void Convert2Morse(object obj)
      {
          TextConverted = am.Convert(NormalText);
  
          foreach (char symbol in TextConverted)
          {
              int milliseconds = 0;
  
              switch (symbol)
              {
                  case '·': milliseconds = 500; break;
                  case '—': milliseconds = 1000; break;
                  case ' ': continue;
                  default: throw new Exception("Something is wrong");
              }
  
              System.Media.SystemSounds.Beep.Play();
              System.Threading.Thread.Sleep(milliseconds);
          }
      }
  </code></pre>
  
  <p>The TextConverted property is showed in a textBox, but is refreshed until finished the subroutine. </p>
  
  <p>Is there a way where can show refresh UI?</p>