linus

linus

  • 0
  • 1
  • 0

Panning problem

Feb 14 2009 1:09 AM
i'm modifying the code provided @ link

i'm trying to do pan without animating... so in the control_MouseMove method i did this


void control_MouseMove(object sender, MouseEventArgs e)
        {
           
            if (this.IsMouseCaptured)
            {
               
                var physicalPoint = e.GetPosition(this);

                this.translateTransform.X = physicalPoint.X - this.ScreenStartPoint.X + this.startOffset.X;
                this.translateTransform.Y = physicalPoint.Y - this.ScreenStartPoint.Y + this.startOffset.Y;         

               
            }
        }

the pan works when i first started the application, however, when i zoom in/out and tries to pan again, it wouldn't move, why is it so?