示例#1
0
 private void grFrame_PreviewMouseMove(object sender, MouseEventArgs e)
 {
     if (e.LeftButton == MouseButtonState.Pressed && !_resized)
     {
         Point  mousePos = e.GetPosition(null);
         Vector diff     = _startPoint - mousePos;
         if (Math.Abs(diff.X) > SystemParameters.MinimumHorizontalDragDistance ||
             Math.Abs(diff.Y) > SystemParameters.MinimumVerticalDragDistance)
         {
             AllowDrop = false;
             _draged   = this;
             DragDrop.DoDragDrop(this, ToString(), DragDropEffects.Move /* | DragDropEffects.Copy*/);
             AllowDrop = true;
         }
     }
 }
示例#2
0
		private void grFrame_PreviewMouseMove(object sender, MouseEventArgs e) {
			if (e.LeftButton == MouseButtonState.Pressed && !_resized) {
				Point mousePos = e.GetPosition(null);
				Vector diff = _startPoint - mousePos;
				if (Math.Abs(diff.X) > SystemParameters.MinimumHorizontalDragDistance ||
					Math.Abs(diff.Y) > SystemParameters.MinimumVerticalDragDistance) {
					AllowDrop = false;
					_draged = this;
					DragDrop.DoDragDrop(this, ToString(), DragDropEffects.Move/* | DragDropEffects.Copy*/);
					AllowDrop = true;
				}
			}
		}