title: WPF TabControl collapsed tab headers are not completely hidden
body: <p>I am using a TabControl to programmatically show or hide groups of form controls. I have implemented the technique described <a href="https://stackoverflow.com/questions/387480/hide-tab-headers-in-wpf-tabcontrol">here</a> and it approximately works as expected, except that there is a band approximately 1 or 2 pixels high in the location where the tab headers are normally displayed.</p>
  
  <p>I have verified this by using <a href="http://snoopwpf.codeplex.com/" rel="nofollow noreferrer">Snoop</a> to navigate the visual tree and observe the movement of the highlight rectangle as each element is selected. The size of the rectangle for the tab content element is fractionally smaller than that of the containing TabControl, which accounts for the extra pixels I am seeing. None of the elements that might affect this have margin, border or padding.</p>
  
  <p>To achieve proper alignment with other controls, I need to eliminate this extra space, but I am not sure how. However, perhaps the question I should be asking is "is there a better way to selectively show / hide groups of controls?".</p>
  
  <p>Thanks for your ideas,
  Tim</p>