title: Force WPF ListView to update DesiredSize before being rendered
body: <p>I have a WPF ListView with "Auto" column widths. After rendering, the column widths correctly match content, that is ok.</p>
  
  <p>I need to determine the correct (rendered) DesiredSize of the ListView right after assigning to ItemsSource, prior to rendering.</p>
  
  <p>The problem is that calling Measure() breaks the Auto width behavior - it resizes the columns to match <em>header</em> content:</p>
  
  <pre><code>listView.ItemsSource = myCollection;
  // now listView.DesiredSize is 0
  listView.Measure(new Size(2000, 2000));  // this breaks "Auto" widths
  </code></pre>
  
  <p>The only hack that comes to my mind is adding spaces to headers manually.</p>