Using DeferredLoadListBox in a Pivot Control
Recently I've been using the DeferredLoadListBox It's a fantastic way of improving the performance of your list views. I started using the DeferredLoadListBox within a Pivot control but occasionally found that the app would randomly crash throwing the following exception: All containers must have a Height set (ex: via ItemContainerStyle), though the heights need not all need to be the same. This usually means you haven't set the properly. However I had ensured I had set the style height. I then got the source and started poking around. What I found was although in the UnmaskItemContent method the container had a height if you inspected the ActualHeight property this was 0. I did a bit of research and found the following on MSDN: ActualWidth and ActualHeight are calculated based on the Width/Height property values and the layout system. There is no guarantee as to when these values will be "calculated" So the problem appeared to be with timing. After contactin