private void MyImage_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
 {
     //クリック位置取得
     MyPoint = e.GetPosition(this);
     //マウスがScrollViewer外になってもドラッグ移動を有効にしたいときだけ必要
     MyImage.CaptureMouse();
 }
Example #2
0
 private void MyImage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     _PositionOnMouseDown      = e.GetPosition(MyScrollViewer); // NOT using the position in MyImage
     _ScrollOffsetsOnMouseDown = new Point(MyScrollViewer.HorizontalOffset, MyScrollViewer.VerticalOffset);
     this.Cursor = Cursors.Hand;
     MyImage.CaptureMouse();
 }