private void _mapControl_MouseMove(object sender, MouseEventArgs e) { if (e.RightButton != MouseButtonState.Pressed) { SelectedMarker = null; _drag = false; _mapControl.UpperLayer.Children.Remove(_line); _mapControl.UpperLayer.Children.Remove(_arrow); _mapControl.UpperLayer.Children.Remove(_panel); } else { var pos = e.GetPosition(_mapControl.UpperLayer); _line.X2 = pos.X; _line.Y2 = pos.Y; CurrentPosition = _gMap.FromLocalToLatLng((int)pos.X, (int)pos.Y); UIHelpers.CalculateArrow(_line, _arrow); Canvas.SetLeft(_panel, pos.X); Canvas.SetTop(_panel, pos.Y - _panel.ActualHeight); } }