title: [WP8.1]Windows Phone [8.1] - PivotItem Layout Update only on Selecting PivotItem
body: <p>Question related to UI (it's been so nice time sitting deep in backend).</p>
  
  <p>Some introduction:</p>
  
  <p>In my project I have MainPage with Pivot Control containing 3 PivotItems. There is also one additional page, let's call it AddPage.</p>
  
  <p>There are two DataSources with relationship between.</p>
  
  <p>PivotItem number 2 has capability to delete items from DataSource_01. When that happens, DataSource_02 re-calculate its content and returns new updated collection for PivotItem number 1. This doesn't add new items to DataSource_02 though, it just changes some properties (currently DataSource_01 has 160 items in 18 categories, Data source_02 keeps this 18 categories with corresponding category sum based on DataSource_01).</p>
  
  <p>PivotItem number 1 holds GridView with items source binded to DataSource_02. Tapping an item fires AddPage that has capability to add items to DataSource_01.</p>
  
  <p>That's simplified logic and it works.</p>
  
  <p>The problem is the LayoutUpdate. After removing item from DataSource_01 on PivotItem_02 when I slide to PivotItem_01 I can see each GridViewItem popping out one at a time. I have not convinced myself yet to accept this kind of behavior so here I am.</p>
  
  <p>I would rather pre-load the view for the PivotItem_01 while still being on PivotItem_02. Maybe before update of PivotItem_02? Is there any way to control this behavior?</p>
  
  <p>I have tried to run my Pivot's UpdateLayout() after database gets updated but it doesn't work.</p>
  
  <p>There is also a twist.</p>
  
  <p>I am writing my app for Windows 8.1 system, while testing it on my Microsoft Lumia 640LTE device with Windows 10. I have also another test device, Nokia Lumia 530 DS with Windows 8.1, and this one works fine, layout gets updated on PivotItem_01 before swiping to it.</p>
  
  <p>I have added to one of the PivotItem_01 controls _SizeChanged event and handler. Handler runs on Windows_10 device when swiping to it while on Windows 8.1 device while updating PivotItem_02. It’s confusing but can be solved. I have also tried with new Data source with categories only and one record in DataSource_01 but it didn’t change anything.</p>
  
  <p>I am not attaching any code while I think it’s not code related question.</p>
  
  <p>Kind Regards,</p>
  
  <p>Adam</p>