title: how does virtualizingstackpanel calculate child size without instantiating the actual item?
body: <p>I am following the tutorials presented here:</p>
  
  <p><a href="http://blogs.msdn.com/b/dancre/archive/tags/virtualizingtilepanel/">http://blogs.msdn.com/b/dancre/archive/tags/virtualizingtilepanel/</a></p>
  
  <p>and in their implementation they have a dependency property on the virtualizingtilepanel that keeps track of the child size. However, the WPF library's virtualizingstackpanel doesn't require me to set a size for the child elements as a property. However, I don't understand how the virtualizing stack panel can calculate which items in the panel are visible without instancing the items. </p>
  
  <p>I would think that they would need a measure pass to know the item containers sizes, but how can they know that without first instantiating the items?</p>
  
  <p>My goal is to create a panel to contain treeviewitems and virtualize them, but following the example from virtualizingtilepanel only lets me virtualize the top level items.</p>
  
  <p>I need to change the way it calculates what items are visible, but I don't see how it can know what items are visible without knowing the size and actually instantiating the items.</p>
  
  <p>edit: wait, maybe it instantiates the objects that go inside the treeviewitem immediately and use those to calculate the size?</p>