title: Why are my WPF window sizes defaulting to be huge
body: <p>I have a wpf application with a few forms. At design time they are small, and they are not set to auto size. However at run time they are giant, even with no content in them to make them big.</p>
  
  <p>Why is this happening?</p>
  
  <p>Here is one of the forms</p>
  
  <pre><code>&lt;Window x:Class="SuperPluginPicker"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               xmlns:tree="clr-namespace:Aga.Controls.Tree;assembly=Aga.Controls" 
               mc:Ignorable="d" 
               d:DesignHeight="296" d:DesignWidth="634" Title="Plugin Selector" WindowStartupLocation="CenterOwner"&gt;
      &lt;Grid&gt;
          &lt;DockPanel LastChildFill="true"&gt;
              &lt;StackPanel DockPanel.Dock="Bottom" Height="30" Orientation="Horizontal"&gt;
                  &lt;Button Content="Ok" Name="btnOk" Click="btnOk_Click"&gt;&lt;/Button&gt;
                  &lt;Button Content="Cancel" Name="btnCancel" Click="btnCancel_Click"&gt;&lt;/Button&gt;
  
              &lt;/StackPanel&gt;
              &lt;StackPanel DockPanel.Dock="Right"&gt;
                  &lt;Label Content="Selected Plugins"&gt;&lt;/Label&gt;
              &lt;ListBox Name="lstSelectedPlugins"  Width="200"&gt;
                  &lt;ListBox.ItemTemplate&gt;
  
  
  
                      &lt;DataTemplate&gt;
  
  
  
                          &lt;Label Content="{Binding Name}" /&gt;
  
                      &lt;/DataTemplate&gt;
  
                  &lt;/ListBox.ItemTemplate&gt;
  
              &lt;/ListBox&gt;
              &lt;/StackPanel&gt;
              &lt;StackPanel DockPanel.Dock="Right" Width="100" VerticalAlignment="Center"&gt;
                  &lt;Button Content="Add" Name ="btnAdd" Click="btnAdd_Click"&gt;&lt;/Button&gt;
                  &lt;Button Content="Remove" Name="btnRemove" Click="btnRemove_Click"&gt;&lt;/Button&gt;
                  &lt;Button Content="Remove All" Name="btnRemoveAll" Click="btnRemoveAll_Click"&gt;&lt;/Button&gt;
              &lt;/StackPanel&gt;
  
              &lt;tree:TreeList  x:Name="pluginTree"&gt;
                  &lt;tree:TreeList.View&gt;
                      &lt;GridView x:Name="treeGrid"&gt;
                          &lt;GridView.Columns&gt;
  
                              &lt;GridViewColumn Width="Auto" Header="Name"&gt;
                                  &lt;GridViewColumn.CellTemplate&gt;
                                      &lt;DataTemplate&gt;
                                          &lt;StackPanel Orientation="Horizontal"&gt;
                                              &lt;tree:RowExpander/&gt;
  
                                              &lt;TextBlock Text="{Binding Name}"&gt;&lt;/TextBlock&gt;
                                          &lt;/StackPanel&gt;
                                      &lt;/DataTemplate&gt;
                                  &lt;/GridViewColumn.CellTemplate&gt;
                              &lt;/GridViewColumn&gt;
                              &lt;GridViewColumn Header="Author" Width="Auto"  DisplayMemberBinding="{Binding Author}"/&gt;
                              &lt;GridViewColumn Header="Description" Width="Auto" DisplayMemberBinding="{Binding Type}"/&gt;
  
  
                          &lt;/GridView.Columns&gt;
                      &lt;/GridView&gt;
                  &lt;/tree:TreeList.View&gt;
              &lt;/tree:TreeList&gt;
          &lt;/DockPanel&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>