/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ConnectorMenuItem_Click(object sender, RoutedEventArgs e) { NodeConnectorViewModel c = (sender as FrameworkElement).DataContext as NodeConnectorViewModel; if (c != null) { while (c.AttachedLinks.Count > 0) { var l = c.AttachedLinks[0]; NodeEditViewModel.RemoveLink(l); } } }