title: WPF ContextMenu = {x:Null} but still shows menu inside ContentControl
body: <p>I need disable standard ContextMenu of TextBox. I've created a new WPF project and added the following:</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication3.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid&gt;
         &lt;ContentControl&gt;
             &lt;ContentControl.ContentTemplate&gt;
                 &lt;DataTemplate&gt;
                      &lt;TextBox ContextMenu="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="50"&gt;&lt;/TextBox&gt;
                  &lt;/DataTemplate&gt;
             &lt;/ContentControl.ContentTemplate&gt;
         &lt;/ContentControl&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>But this is what i get : </p>
  
  <p><img src="https://i.stack.imgur.com/9iu82.png" alt="enter image description here"></p>
  
  <p>The following code works fine : </p>
  
  <pre><code>&lt;Grid&gt;
       &lt;TextBox ContextMenu="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="50"&gt;&lt;/TextBox&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Why is this happening?</p>
  
  <p><strong>Update.</strong></p>
  
  <p>According to the accepted answer I've created a class derived from TextBox in order to be able to show parents ContextMenu. </p>
  
  <pre><code>    public class TextBoxNoMenu: TextBox
      {
          public TextBoxNoMenu()
          {
              ContextMenu = null;
          }
      }
  </code></pre>