title: Object not Disappearing with Opacity
body: <p>I have a WPF program that shows a web browser control. The web browser control is in an overlay to get it to show up in WPF. I start off the WPF program with the width set to 0 and the opacity set to 0 and it seems to work okay (other than a thin straight line that disappears when you move the form). There is a button that when pressed sets the overlay to visible and the width to 1000:</p>
  
  <pre><code>WB_DocPanel.Visibility = System.Windows.Visibility.Visible;
  WB_DocPanel.Opacity = 1d;
  wbo.Visibility = System.Windows.Visibility.Visible;
  wbo.Width = 1000;
  </code></pre>
  
  <p>This successfully shows the web browser object. I have another button that does the exact opposite, however, when pressed it still leaves the box where the web browser was. Any ideas how to get rid of it?</p>
  
  <pre><code>WB_DocPanel.Visibility = System.Windows.Visibility.Collapsed;
  WB_DocPanel.Opacity = 0d;
  wbo.Visibility = System.Windows.Visibility.Collapsed;
  wbo.Width = 0;
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>&lt;DockPanel Grid.Row="1" Name="WB_DocPanel" Visibility="Collapsed" Opacity="0" &gt;
    &lt;Border DockPanel.Dock="Top" Margin="30 10 30 20" Name="_webBrowserPlacementTarget" /&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>Is how the doc panel is generated. On the main window opening the following code is present:</p>
  
  <pre><code>WebBrowser wb = new WebBrowser();
  wbo = new WPF.WebBrowserOverlay.WebBrowserOverlay(_webBrowserPlacementTarget);
  wb = wbo.WebBrowser;
  </code></pre>