Hi!
I'm building SL application for zooming and panning across the layout. Everything is working fine, except that when I zoom in using mouse wheel , after some zoom scrollbars start to use mouse wheel so after that I can scroll not zoom. I only can zoom again if I put scrollbars at the end or begining. How to prevent scrollviewer from using mouse wheel? I want that zoom only be operated by wheel. Thank you in advance!
Here is my code of MouseWheel method when I'm zooming content :
protected override void OnMouseWheel(MouseWheelEventArgs e)
{
base.OnMouseWheel(e);
if (e.Delta > 0)
{
this.aniScaleX.To += 0.2;
this.aniScaleY.To += 0.2;
this.sbScale.Begin();
}
else if (e.Delta < 0 && (this.aniScaleX.To > 1 && this.aniScaleY.To > 1))
{
this.aniScaleX.To -= 0.2;
this.aniScaleY.To -= 0.2;
this.sbScale.Begin();
}
Sizer.Width = Board.ActualWidth * (double)this.aniScaleX.To;
Sizer.Height = Board.ActualHeight * (double)this.aniScaleY.To;