I'm quite new to WPF and I'm sure I'm missing something trivial. The scrollviewer does not work when the content of the stackpanel grows.
<ItemsControl>
<TextBlock Margin="30,4,0,4" Text="Associated Data: None" Visibility="{Binding SelectedPBL.PBLData.Count, Converter={StaticResource VisibleIfZero}}"/>
<ScrollViewer>
<StackPanel Margin="30,4,0,4" Orientation="Horizontal" Visibility="{Binding SelectedPBL, Converter={StaticResource CollapsedIfNull}}" ScrollViewer.VerticalScrollBarVisibility="Auto">
<TextBlock FontSize="12" Text="Associated Data:" Visibility="{Binding SelectedPBL.PBLData.Count, Converter={StaticResource CollapsedIfZero}}"/>
<ItemsControl FontSize="12" ItemsSource="{Binding SelectedPBL.PBLData}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<WrapPanel Margin="20,0,20,0" Orientation="Horizontal">
<TextBlock Margin="0,0,10,0" Text="{Binding Path=Key, StringFormat=({0})}"/>
<TextBlock Text="{Binding Path=Value}"/>
</WrapPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</ItemsControl>