title: How do I disable all MenuItems in a ContextMenu in XAML?
body: <p>I've tried to just Bind to ContextMenu.IsEnabled but that makes it so the ContextMenu stays stuck open even after clicking off of it. Illustrated in this simplified code and screenshot: </p>
  
  <pre><code>&lt;Window x:Class="ContextMenuSample.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow"
          Height="480"
          Width="640"&gt;
      &lt;Grid&gt;
          &lt;Rectangle Width="100"
                     Height="100"
                     Fill="Black"&gt;
              &lt;Rectangle.ContextMenu&gt;
                  &lt;ContextMenu IsEnabled="False"&gt;
                      &lt;MenuItem Header="Command _1" /&gt;
                      &lt;MenuItem Header="Command _2" /&gt;
                      &lt;MenuItem Header="Command _3" /&gt;
                      &lt;MenuItem Header="Command _4" /&gt;
                  &lt;/ContextMenu&gt;
              &lt;/Rectangle.ContextMenu&gt;
          &lt;/Rectangle&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/p7y9Z.png" alt="ContextMenu stuck open"></p>
  
  <p>Any suggestions how I would go about disabling all context menu options in simple manner through XAML without the ContextMenu acting all funny?</p>