title: Assigning DependencyProperty runs slow
body: <p>There is <strong>Button</strong> <em>button1</em> and <strong>TextBox</strong> <em>textBox1</em>. Here's <em>button1</em>'s <strong>ClickEvent</strong> hadler:</p>
  
  <pre><code>private void button1_Click(object sender, RoutedEventArgs e)
  {
      DateTime now = DateTime.Now;
      textBox1.Text = "some text";
      TimeSpan span = DateTime.Now - now;
      MessageBox.Show(span.TotalMilliseconds.ToString());
  }            
  </code></pre>
  
  <p><em>span.TotalMilliseconds</em> is 1...2 in Debug and 0...1 in Release. But even in Release it has value of "0" only in about 2 times of 10.</p>
  
  <p>Question is, why is it so slow? </p>
  
  <p>I am implementing my own control similar to <strong>DataGrid</strong> and I have about 300 visible cells on screen. I implemented my own UI virtualization that is based on moving data "behind" the cells. So every time I scroll each cell's text gets updated. And it lasts more than 300 milliseconds. </p>