title: Creating custom WPF layout panel - ignored children not disappearing
body: <p>Good afternoon. I'm creating a custom WPF layout control that needs to omit children from the measure/arrange process if they won't fit in the available area. I'm testing with Blend.</p>
  
  <p>I have tried overriding GetVisualChild(n) and VisualChildCount to try and allow the runtime to only recognize certain elements as my desired children. This seems to work okay, but the big issue I'm having is this:</p>
  
  <p>I drop some children into my layout control from Blend. I then shrink the control where some children won't fit inside my panel. The issue is that the children that are no longer in view remain rendered on the Blend design surface. I have tried invalidating their visual, calling "RemoveVisualChildI()".. but nothing seems to want to make the rendered visuals disappear.</p>
  
  <p>Breaking into the GetViasualChild(...) method, I am witnessing Blend and the runtime are only asking for the actual visible children (fully contained inside my layout panel). So, it seems to me that the problem is tied to the child elements thinking that they still need to be rendered..or that the container panel just doesn't know it needs re-rendering.</p>
  
  <p>Any clues? I can try and provide more detail if it's needed, but my basic need is the ability to selectively hide/show (omit from the measure/arrange process) certain children of a custom panel.</p>
  
  <p>Thanks!
  - Sean</p>