ScrollViewer in XAML - is this a bug in Revit / PyRevit?

In the good example the scroll appears, but in the bad example it does not. Am I missing something or is this a bug in Revit / PyRevit

good example:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Formx" Width="800" Height="200" Padding="140,1,4,4">
  <TabControl>
    <TabItem Header="Prompt">
      <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
        <StackPanel Margin="20">
          <Label Content="Label 1" Height="70"/>
          <Label Content="Label 2" Height="70"/>
          <Label Content="Label 3" Height="70"/>
          <Label Content="Label 4" Height="70"/>
        </StackPanel>
      </ScrollViewer>
    </TabItem>
  </TabControl>
</Window>

bad example:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Formx" Width="800" Height="200" Padding="140,1,4,4">
  <StackPanel Margin="20">
    <TabControl>
      <TabItem Header="Prompt">
        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
          <StackPanel Margin="20">
            <Label Content="Label 1" Height="70"/>
            <Label Content="Label 2" Height="70"/>
            <Label Content="Label 3" Height="70"/>
            <Label Content="Label 4" Height="70"/>
          </StackPanel>
        </ScrollViewer>
      </TabItem>
    </TabControl>
  </StackPanel>
</Window>