public static void MarkerPositionChanged(object sender, PositionChangedMarkerEventArgs e) { Marker currentMarker = (Marker)sender; currentMarker.ToolTip = GetWorkingContent(e.NewPosition); ClosablePopup attachedPopup = currentMarker.Tag as ClosablePopup; if (attachedPopup != null) { attachedPopup.Position = new Point(e.NewPosition.X, e.NewPosition.Y); attachedPopup.WorkingContent = GetWorkingContent(e.NewPosition); } }
private static void marker_PositionChanged(object sender, PositionChangedMarkerEventArgs e) { //if (!isPositionChangeStarted && Keyboard.Modifiers == ModifierKeys.Shift) if (!isPositionChangeStarted) { isPositionChangeStarted = true; double offsetX = e.NewPosition.X - e.PreviousPosition.X; double offsetY = e.NewPosition.Y - e.PreviousPosition.Y; foreach (var marker in CurrentMarkerOverlay.Markers.Where(tmpMarker => tmpMarker != sender)) { marker.Position = new Point(marker.Position.X + offsetX, marker.Position.Y + offsetY); } isPositionChangeStarted = false; } }