I have an image inside a ScrollViewer. When I set image width larger, HorizontalScrollBar appeared. Then I set image Width smaller than ScrollViewer With but this ScrollBar still appear, like this:

How I can fix this problem? Thank you!
<Grid>
<ScrollViewer
Name="sv"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
PreviewMouseWheel="sv_PreviewMouseWheel">
<Image Name="img"/>
</ScrollViewer>
</Grid>
Code:
void sv_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if ((System.Windows.Forms.Control.ModifierKeys & System.Windows.Forms.Keys.Control) != System.Windows.Forms.Keys.Control) base.OnMouseWheel(e);
else
{
if (e.Delta > 0)
{
if (img.ActualHeight < img.Source.Height * 5)
{
double h2 = img.Height = img.ActualHeight * 1.1;
double w2 = img.Width = img.Source.Width * h2 / img.Source.Height;
}
}
// PROBLEM HERE:
else if (img.ActualHeight > 100) img.Height = img.ActualHeight / 1.1;
}
}