title: Hide WPF elements in Visual Studio designer
body: <p>I have a WPF form which basically looks like this:</p>
  
  <pre><code>&lt;Window ...&gt;
    &lt;Grid&gt;
      &lt;DockPanel&gt;
        [content shown during normal operation]
      &lt;/DockPanel&gt;
  
      &lt;Grid Background="#CCCC" Visibility="Hidden"&gt;
        [overlay grid which is only shown during special circumstances]
      &lt;/Grid&gt;
    &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>The overlay grid hides everything else (i.e. the "normal content") and is only shown under special circumstances (i.e. if the network connection goes down). This works perfectly fine when <strong>running</strong> the program.</p>
  
  <p>Now, in <strong>design mode</strong>, the problem is that Visual Studio ignores the <code>Visibility="Hidden"</code>. Usually, this makes perfect sense (after all, I want to be able to edit the hidden UI elements), but in my case it's annoying, because it prevents me from editing the stuff in the DockPanel in the designer.</p>
  
  <p>So, what I'd like to do is something like that:</p>
  
  <pre><code>&lt;Grid Background="#CCCC" Visibility="Hidden" VS.ShowInDesigner="False"&gt;
    [overlay grid which is only shown during special circumstances]
  &lt;/Grid&gt;
  </code></pre>
  
  <p>But, alas, there is no such property, or at least none that I know of. Any ideas?</p>