Why are you making ScrollViewer as a child of the stack panel. Make the scroll viewer as a Parent of the stack panel and then add the child elements to the stack panel
try like that
<ScrollViewer CanContentScroll="True" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Visible"PanningMode="HorizontalOnly" DataContext="{Binding}" Width="300">
<StackPanel Height="166" HorizontalAlignment="Left" Name="SP1" VerticalAlignment="Top" Width="620" Orientation="Horizontal" CanHorizontallyScroll="True" ForceCursor="False" SnapsToDevicePixels="True" OverridesDefaultStyle="True">
</StackPanel>
</ScrollViewer>
Whenever you need ScrollBar, then add that element under ScrollViewer. ScrollBar will automatically come.