title: C# wait 1 second
body: <p>Is there such a function like sleep(seconds) but it wouldn't block UI updates?
  I have a code like this and if I put threading sleep after <code>(letters.Children[Words[index].index] as TextBlock).Text = Words[index].LetterCorrect;</code> (I want to sleep after that) it just waits 1 sec and then UI gets updates, but I dont want that.</p>
  
  <pre><code>private void Grid_Click(object sender, RoutedEventArgs e)
  {
      if (index == Words.Count() - 1) return;
      if ((((e.Source as Button).Content as Viewbox).Child as Label).Content.ToString() == Words[index].LetterCorrect)
      {
          (letters.Children[Words[index].index] as TextBlock).Text = Words[index].LetterCorrect;
  
          letters.Children.Clear();
          LoadWord(++index);
          this.DataContext = Words[index];
      }
  }
  </code></pre>