private void ContextMenuParentOnMapMoved(object sender, MoveTransformEventArgs e) { if (_showingContextMenu != null && _showingContextMenu.Visibility == Visibility.Visible) { var x = Canvas.GetLeft(_showingContextMenu); var y = Canvas.GetTop(_showingContextMenu); Canvas.SetLeft(_showingContextMenu, x + e.X * ContextMenuParent.Zoom); Canvas.SetTop(_showingContextMenu, y + e.Y * ContextMenuParent.Zoom); } }
private void OnMapMoved(object sender, MoveTransformEventArgs e) { if (InMotion) { foreach (var arrowCreationSet in ArrowCreationSets) { var from = arrowCreationSet.From.Centre; from.X += e.X; from.Y += e.Y; arrowCreationSet.From.Centre = from; } } }
public void OnMapMoved(object sender, MoveTransformEventArgs e) { if (_isDrag) { _previousMouseLocation.X += e.X; _previousMouseLocation.Y += e.Y; var offset = _previousMouseLocation.Subtract(_currentMouseLocation); _previousMouseLocation = _currentMouseLocation; UserControl.Centre = UserControl.Centre.Subtract(offset); if (NodeInMotionEvent != null) { NodeInMotionEvent(this, new NodeMotionHandlerEventArgs { Location = _currentMouseLocation }); } } }
public void OnMapMoved(object sender, MoveTransformEventArgs e) { NodeMotionHandler.OnMapMoved(sender, e); }
public void OnMapMoved(object sender, MoveTransformEventArgs e) { }