title: WPF XAML ScrollViewer will not scroll
body: <p>I cannot get my scrollviewer to scroll</p>
  
  <p>If I set the VerticalScrollBarVisibility="Auto" it doesn't even show which indicates it doesn't think it is needed</p>
  
  <p>I have tried different things with the Row heights of my grid like changing them from auto to * but still  no luck</p>
  
  <p>Here is my XAML</p>
  
  <pre><code>&lt;UserControl mc:Ignorable="d" Height="680" Width="750"
           d:DesignHeight="300" d:DesignWidth="300"&gt;
  
  &lt;Border Name="b" Margin="10,0,10,10" Style="{DynamicResource BorderStyle}" Background="{DynamicResource BackgroundBrush}"&gt;
      &lt;DockPanel x:Name="MainPanel"&gt;
  
          &lt;!-- header area --&gt;
          &lt;DockPanel Margin="10,0,10,0" DockPanel.Dock="Top" Height="80" x:Name="HeaderPanel"&gt;
              &lt;TextBlock Text="Uncertainty in Sample - Volume Final and Volume Initial" Style="{DynamicResource HeaderStyle}" FontWeight="Bold" Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource HeaderFontColor}"/&gt;
              &lt;Image Source="/images/sample.jpg" HorizontalAlignment="Right"&gt;&lt;/Image&gt;
          &lt;/DockPanel&gt;
  
       &lt;Border Name="b"&gt;
          &lt;StackPanel&gt;
  
              &lt;Separator Height="1" Margin="0" VerticalAlignment="Top" Width="750" HorizontalAlignment="Left"/&gt;
  
              &lt;ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="{Binding Path=ActualHeight, ElementName=b, Mode=OneWay}"&gt;                    &lt;Grid HorizontalAlignment="Left" x:Name="Outer" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
  
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
  
                      &lt;GroupBox Grid.Row="0" Grid.Column="0" Header="Volume Final" Style="{DynamicResource GroupBoxStyle}"&gt;
  
                          &lt;Grid HorizontalAlignment="Left" x:Name="GridVolume" VerticalAlignment="Top" Margin="0,0,0,0"&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                              &lt;/Grid.RowDefinitions&gt;
  
                              &lt;Label Grid.Row="0" Grid.Column="0" Content="Select Volumetric size:" Target="{Binding ElementName=VolumetricComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                              &lt;ComboBox x:Name="VolumetricComboBox" Grid.Row="0" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Label" ItemsSource="{Binding Path=Volumetrics}" SelectedItem="{Binding Path=SelectedVolumeFinalVolumetric, Mode=TwoWay}" Height="22" /&gt;
  
  
                              &lt;Label Grid.Row="1" Grid.Column="0" Content="Select Solvent:" Target="{Binding ElementName=SolventComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                          &lt;ComboBox x:Name="SolventComboBox" Grid.Row="1" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Solvent" ItemsSource="{Binding Path=ThermalExpansions}" SelectedItem="{Binding Path=SelectedVolumeFinalThermalExpansion, Mode=TwoWay}" Height="22" /&gt;
  
                              &lt;Label Grid.Row="2" Grid.Column="0" Content="Select Temperature (° c):" Target="{Binding ElementName=SolventComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                          &lt;ComboBox x:Name="TemperatureComboBox" Grid.Row="2" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="TemperatureValue" ItemsSource="{Binding Path=Temperatures}" SelectedItem="{Binding Path=SelectedVolumeFinalTemperature, Mode=TwoWay}" Height="22" /&gt;
  
                          &lt;/Grid&gt;
                      &lt;/GroupBox&gt;
  
  
                      &lt;GroupBox Grid.Row="0" Grid.Column="1" Header="Area" Style="{DynamicResource GroupBoxStyle}"&gt;
                          &lt;StackPanel&gt;
                              &lt;StackPanel Orientation="Horizontal" VerticalAlignment="Top"&gt;
                                  &lt;Label Content="System Inj. Reproducibility (% RSD):" Foreground="{DynamicResource InputFontColor}" /&gt;
                                  &lt;TextBox TextWrapping="Wrap" Style="{StaticResource TextStyle}" x:Name="SystemInjectionTextBox" Width="135" Text="{Binding Path=Sample.Precision.SystemInjectionReproducibility}" Margin="5,0,0,0" IsEnabled="True"/&gt;
                              &lt;/StackPanel&gt;
                              &lt;StackPanel Orientation="Horizontal" VerticalAlignment="Top"&gt;
                                  &lt;Label Content="Enter % RSD of Sample results (zero if unknown):" Target="{Binding ElementName=AreaTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}"/&gt;
                                  &lt;TextBox TextWrapping="Wrap" Style="{StaticResource TextStyle}" x:Name="AreaTextBox" Width="70" Text="{Binding Path=Sample.Precision.RSDKnownAmount}" HorizontalAlignment="Left" Margin="5,0,0,0" /&gt;
                              &lt;/StackPanel&gt;
                          &lt;/StackPanel&gt;
                      &lt;/GroupBox&gt;
  
                      &lt;GroupBox Grid.Row="1" Grid.Column="0" Header="Volume Initial" Style="{DynamicResource GroupBoxStyle}"&gt;
                          &lt;Grid HorizontalAlignment="Left" x:Name="GridMass" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                              &lt;/Grid.RowDefinitions&gt;
  
                              &lt;Label Grid.Row="0" Grid.Column="0" Content="Select Balance:" Target="{Binding ElementName=BalanceComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                              &lt;ComboBox x:Name="BalanceComboBox" Grid.Row="0" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Description" ItemsSource="{Binding Path=Balances}" SelectedItem="{Binding Path=SelectedVolumeIntitialBalance, Mode=TwoWay}" Height="22" /&gt;
  
                              &lt;Label Grid.Row="1" Grid.Column="0" Content="Mass Weighed (g):" Target="{Binding ElementName=MassWeighedTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                              &lt;TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Style="{StaticResource TextStyle}" x:Name="MassWeighedTextBox" Width="135" Text="{Binding Path=Sample.VolumeInitial.Mass.MassWeighed}" HorizontalAlignment="Left" Margin="5,0,0,0"/&gt;
                          &lt;/Grid&gt;
  
                      &lt;/GroupBox&gt;
  
                      &lt;GroupBox Grid.Row="2" Grid.Column="0" Header="Reported Units" Style="{DynamicResource GroupBoxStyle}"&gt;
                          &lt;Grid HorizontalAlignment="Left" x:Name="GridReportedUnits" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto" /&gt;
                              &lt;/Grid.RowDefinitions&gt;
  
                              &lt;Label Grid.Row="0" Grid.Column="0" Content="Select Reported Units:" Target="{Binding ElementName=BalanceComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                              &lt;StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"&gt;
                                  &lt;StackPanel.Resources&gt;
                                      &lt;views:EnumBooleanConverter x:Key="enumBooleanConverter" /&gt;
                                  &lt;/StackPanel.Resources&gt;
                                  &lt;RadioButton GroupName="ReportedUnits" Content="W/V" IsChecked="{Binding Path=SelectedRadioButton, Converter={StaticResource enumBooleanConverter}, ConverterParameter=WeightVolume}" Command="{Binding RadioClicked}" Margin="0, 0, 10, 0" /&gt;
                                  &lt;RadioButton GroupName="ReportedUnits" Content="W/W" IsChecked="{Binding Path=SelectedRadioButton, Converter={StaticResource enumBooleanConverter}, ConverterParameter=WeightWeight}" Command="{Binding RadioClicked}" Margin="0, 0, 10, 0"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/Grid&gt;
                      &lt;/GroupBox&gt;
  
                      &lt;GroupBox Grid.ColumnSpan="3" Grid.Row="3" Header="Density" Style="{DynamicResource GroupBoxStyle}" Visibility="{Binding Path=DensityVisible}"&gt;
  
                          &lt;StackPanel&gt;
                              &lt;Grid HorizontalAlignment="Left" x:Name="GridDensity" VerticalAlignment="Top" Margin="5,5,0,0"&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="Auto" /&gt;
                                      &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Grid.RowDefinitions&gt;
                                      &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;/Grid.RowDefinitions&gt;
  
                                  &lt;Label Grid.Row="0" Grid.Column="0" Content="Enter Method of Density Determination:" Target="{Binding ElementName=DensityDeterminationComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                  &lt;StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="1"&gt;
                                      &lt;ComboBox x:Name="DensityDeterminationComboBox" Width="200" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Method" ItemsSource="{Binding Path=DensityDeterminations}" SelectedItem="{Binding Path=SelectedDensityDetermination, Mode=TwoWay}" Height="22" /&gt;
                                      &lt;Label Grid.Row="0" Grid.Column="0" Content=" u(d) = 1" Foreground="{DynamicResource InputFontColor}" Visibility="{Binding Path=DensityClientSuppliedVisible}"/&gt;
                                  &lt;/StackPanel&gt;
                              &lt;/Grid&gt;
  
  
                              &lt;Grid HorizontalAlignment="Left" Grid.Row="4" Grid.ColumnSpan="3" x:Name="OuterDensityGridMass" VerticalAlignment="Top" Margin="0,20,0,0"&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="Auto" /&gt;
                                      &lt;ColumnDefinition Width="Auto" /&gt;
                                      &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Grid.RowDefinitions&gt;
                                      &lt;RowDefinition Height="Auto" /&gt;
                                  &lt;/Grid.RowDefinitions&gt;
  
                                  &lt;GroupBox Grid.Row="0" Grid.Column="0" Margin="5,5,5,5" Header="" Style="{DynamicResource GroupBoxStyle}" Visibility="{Binding Path=DensityDensitoVisible}"&gt;
  
                                      &lt;Grid HorizontalAlignment="Left" x:Name="DensityGridUserEntered" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;Grid.RowDefinitions&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                          &lt;/Grid.RowDefinitions&gt;
  
                                          &lt;Label Grid.Row="1" Grid.Column="0" Content="Enter Density (g/ml):" Target="{Binding ElementName=DensityUserEnteredTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Style="{StaticResource TextStyle}" x:Name="DensityUserEnteredTextBox" Width="135" Text="{Binding Path=UserEnteredDensity, Mode=TwoWay}" HorizontalAlignment="Left" Margin="5,0,0,0"/&gt;
                                      &lt;/Grid&gt;
  
                                  &lt;/GroupBox&gt;
  
                                  &lt;GroupBox Grid.Row="0" Grid.Column="0" Margin="5,5,5,5" Header="Mass" Style="{DynamicResource GroupBoxStyle}" Visibility="{Binding Path=DensityMassVolumeVisible}"&gt;
  
                                      &lt;Grid HorizontalAlignment="Left" x:Name="DensityGridMass" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;Grid.RowDefinitions&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                          &lt;/Grid.RowDefinitions&gt;
  
                                          &lt;Label Grid.Row="0" Grid.Column="0" Content="Select Balance:" Target="{Binding ElementName=DensityBalanceComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;ComboBox x:Name="DensityBalanceComboBox" Grid.Row="0" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Description" ItemsSource="{Binding Path=Balances}" SelectedItem="{Binding Path=SelectedDensityBalance, Mode=TwoWay}" Height="22" /&gt;
  
                                          &lt;Label Grid.Row="1" Grid.Column="0" Content="Mass Weighed (g):" Target="{Binding ElementName=DensityMassWeighedTextBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Style="{StaticResource TextStyle}" x:Name="DensityMassWeighedTextBox" Width="135" Text="{Binding Path=Sample.Density.Mass.MassWeighed}" HorizontalAlignment="Left" Margin="5,0,0,0"/&gt;
                                      &lt;/Grid&gt;
  
                                  &lt;/GroupBox&gt;
  
                                  &lt;GroupBox Grid.Row="0" Grid.Column="1" Header="Volume" Style="{DynamicResource GroupBoxStyle}" Visibility="{Binding Path=DensityMassVolumeVisible}" Margin="5,5,5,5"&gt;
  
                                      &lt;Grid HorizontalAlignment="Left" x:Name="DensityGridVolume" VerticalAlignment="Top" Margin="0,10,0,0"&gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                              &lt;ColumnDefinition Width="Auto" /&gt;
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;Grid.RowDefinitions&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                              &lt;RowDefinition Height="Auto" /&gt;
                                          &lt;/Grid.RowDefinitions&gt;
  
                                          &lt;Label Grid.Row="0" Grid.Column="0" Content="Select Volumetric size:" Target="{Binding ElementName=DensityVolumetricComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;ComboBox x:Name="DensityVolumetricComboBox" Grid.Row="0" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Label" ItemsSource="{Binding Path=Volumetrics}" SelectedItem="{Binding Path=SelectedDensityVolumetric, Mode=TwoWay}" Height="22" /&gt;
  
                                          &lt;Label Grid.Row="1" Grid.Column="0" Content="Select Solvent:" Target="{Binding ElementName=DensitySolventComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;ComboBox x:Name="DensitySolventComboBox" Grid.Row="1" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="Solvent" ItemsSource="{Binding Path=ThermalExpansions}" SelectedItem="{Binding Path=SelectedDensityThermalExpansion, Mode=TwoWay}" Height="22" /&gt;
  
                                          &lt;Label Grid.Row="2" Grid.Column="0" Content="Select Temperature:" Target="{Binding ElementName=DensityTemperatureComboBox, Mode=OneWay}" Foreground="{DynamicResource InputFontColor}" /&gt;
                                          &lt;ComboBox x:Name="DensityTemperatureComboBox" Grid.Row="2" Grid.Column="1" Width="180" HorizontalAlignment="Left" Margin="5,0,0,0" DisplayMemberPath="TemperatureValue" ItemsSource="{Binding Path=Temperatures}" SelectedItem="{Binding Path=SelectedDensityTemperature, Mode=TwoWay}" Height="22" /&gt;
                                      &lt;/Grid&gt;
  
                                  &lt;/GroupBox&gt;
  
                              &lt;/Grid&gt;
                          &lt;/StackPanel&gt;
                      &lt;/GroupBox&gt;
  
                  &lt;/Grid&gt;
  
              &lt;/ScrollViewer&gt;
            &lt;/StackPanel&gt;
           &lt;/Border&gt;
  
      &lt;/DockPanel&gt;
  &lt;/Border&gt;
  &lt;/UserControl&gt;
  </code></pre>