private void MainCanvas_Drop(object sender, DragEventArgs e) { FrameworkElement elem = sender as FrameworkElement; if (elem == null) { return; } IDataObject data = e.Data; if (!data.GetDataPresent(typeof(FlowElement))) { return; } FlowElement source = data.GetData(typeof(FlowElement)) as FlowElement; if (source == null) { return; } if (e.Source is FlowElement) { FlowLink FL = new FlowLink(source, (FlowElement)e.Source); FL.LinkStyle = FlowLink.eLinkStyle.Arrow; GEList.Add(FL); SetFlowLinkConnectorsLocations(FL, e); FL.Draw(); MainCanvas.Children.Add(FL); } }
public void AddConnector(FlowLink FL) { GEList.Add(FL); FL.Draw(); MainCanvas.Children.Add(FL); }