# How to Prevent Shapes from Being Connected to Themselves

## Environment

<table>
	<tr>
		<th scope="row">Product Version</th>
		<td>2018.2.515</td>
	</tr>
	<tr>
		<th scope="row">Product</th>
		<td>RadDiagram for WPF</td>
	</tr>
</table>

## Description

How to prevent a RadDiagramShape to connect to itself when you single click on one of its connector points.

## Solution

To prevent this use one of the following two solutions:

### Solution #1

Set the **ReflexiveRouter** of RadDiagram to null.

```C#
	this.diagram.RoutingService.ReflexiveRouter = null;
```

### Solution #2

Handle the **ConnectionManipulationCompleted** event of RadDiagram, if the connection source is the same as the Shape of the event arguments.

```C#
	private void RadDiagram_ConnectionManipulationCompleted(object sender, Telerik.Windows.Controls.Diagrams.ManipulationRoutedEventArgs e)
	{
		if (e.Connection.Source == e.Shape)
		{           
			e.Handled = true;
		}
	}
```

## See Also

* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/getting-started)
* [Routing](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/features/routing)
* [Services](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/features/services)
