title: Change GridView Header Height
body: <p>I want to change the height of my GridView, in XAML i use the following code:</p>
  
  <pre><code>&lt;Window.Resources&gt;
  
          &lt;Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}"&gt;
              &lt;Setter Property="Height" Value="45"&gt;&lt;/Setter&gt;
          &lt;/Style&gt;
  
      &lt;/Window.Resources&gt;
  
  
      &lt;ListView x:Name="LView"&gt;
          &lt;ListView.View&gt;
              &lt;GridView x:Name="GView" ColumnHeaderContainerStyle="{StaticResource myHeaderStyle}"&gt;&lt;/GridView&gt;
          &lt;/ListView.View&gt;
      &lt;/ListView&gt;
  </code></pre>
  
  <p>But if I want to do this dynamically? I tried:</p>
  
  <pre><code>Style style = new Style();
              style.TargetType = typeof(GridViewColumnHeader);
              style.Setters.Add(new Setter(GridViewColumnHeader.HeightProperty, 155));
  
              GView.ColumnHeaderContainerStyle = style;
  </code></pre>
  
  <p>But I have an ArgumentException (the value 155 is not a valid value). Why? How can i solve this problem? Thanks.</p>