title: Disable column reordering in WPF with Style
body: <p>I have an application with a lot of <code>ListView</code> controls using the <code>GridView</code> layout. All of these use a custom <code>Style</code> <code>customStyle</code>. I want to disable column reordering in all of these <code>ListView</code> controls.</p>
  
  <p>Can I do this without touching all of the controls using the existing Style? I tried this, but it doesn't seem to work:</p>
  
  <pre><code>&lt;Style x:Key="customStyle"
         BasedOn="{StaticResource ResourceKey={x:Type ListView}}"
         TargetType="{x:Type ListView}"&gt;
      &lt;Setter Property="GridView.AllowsColumnReorder" Value="False" /&gt;
      ...
  &lt;/Style&gt;
  </code></pre>
  
  <p>Thanks!</p>
  
  <p><strong>Update:</strong> If this is not possible, is there a way to disable the column reordering by default in my application?</p>
  
  <p><strong>Update:</strong>
  I also tried this, which doesn't work. Probably because GridView doesn't have a <code>Style</code> property.</p>
  
  <pre><code>&lt;Style TargetType="{x:Type GridView}"&gt;
      &lt;Setter Property="AllowsColumnReorder" Value="False" /&gt;
      ...
  &lt;/Style&gt;
  </code></pre>