New to Telerik UI for WPFStart a free 30-day trial

Prevent RadDiagramConnection Point from Delete

Updated on Sep 15, 2025

Environment

Product Version2019.3.1023
ProductRadDiagram for WPF

Description

How to prevent RadDiagramConnection point from delete.

Solution

To achieve this requirement you can handle the PreviewMouseLeftButtonDown event of RadDiagram in the situation when Ctrl is pressed and a RadDiagramConnection point is under the mouse.

Example 1: Prevent RadDiagramConnection Point from Delete C# private void Diagram_PreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { var selectionService = this.diagram.ServiceLocator.GetService<ISelectionService<IDiagramItem>>() as SelectionService; if (KeyboardModifiers.IsControlDown) { var selectedConnection = selectionService.SelectedConnections.FirstOrDefault(); if (selectedConnection != null) { var position = e.GetPosition(this.diagram); var transformedPosition = this.diagram.GetTransformedPoint(position); var relativePoint = new Point(transformedPosition.X - 5, transformedPosition.Y - 5); var rect = new Rect(relativePoint, new Size(10, 10)); if (connection.ConnectionPoints.Any(rect.Contains)) { e.Handled = true; } } } }

In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support