title: How to hide ContextMenus with no visible items?
body: <p>I have several ContextMenus with items defined as such:</p>
  
  <pre><code>&lt;ContextMenu&gt;
      &lt;MenuItem Header="Item 1" Command="{Binding Item1Command}"/&gt;
      &lt;MenuItem Header="Item 2" Command="{Binding Item2Command}"/&gt;
      &lt;MenuItem Header="Item 3" Command="{Binding Item3Command}"/&gt;
  &lt;/ContextMenu&gt;
  </code></pre>
  
  <p>The <code>Command</code> bindings have <code>CanExecute</code> set so that when it's false, the <code>MenuItem</code> has <code>IsEnabled=false</code>. This goes on with a trigger that sets <code>Visibility=Collapsed</code> when <code>IsEnabled=false</code> and the opposite happens as well.  The problem I'm running into is if all <code>MenuItem</code>s are disabled, the <code>ContextMenu</code> still shows up as a small blank rectangle.  I have a lot of <code>ContextMenu</code>s, so what would be the most modular way to implement this?</p>