title: How to use grid rows and columns with collapsible items?
body: <p>I have a grid with several items inside, not all of them are visible: some are collapsed. Is there a simple way in <code>WPF</code> to resize the already visible items in the grid when a new item shows up?</p>
  
  <p>Actually my needs are simpler than that: I only have 2 items that must be stacked vertically. Most of the time only one will be visible, but when the second appears I need the first one to resize to a 2/3 of the size of the grid and the second to be placed below filling the remaining place: 1/3.</p>
  
  <p><img src="https://i.stack.imgur.com/6RmL1.jpg" alt="enter image description here"></p>
  
  <p>I feel like I have to play with the <code>Grid.Row</code> properties (and maybe with <code>Grid.RowSpan</code>) but I don't know how to achieve the desired behavior without messing it up in the code-behind.</p>
  
  <p>What I've tried is mixing the auto-size with the <code>LastChildFill</code> property of <code>DockPanel</code> without success.</p>