private void TxtHeader_OnPreviewMouseDown(object sender, MouseButtonEventArgs e) { var element = (FrameworkElement)sender; _field = (SmartFiled)element.DataContext; DragHelper.SetClick(new DragElement((IDragElement)_field, WorkSpace.Instance), e); e.Handled = false; }
private void CanvTag_PreviewMouseDown(object sender, MouseButtonEventArgs e) { var item = (FrameworkElement)sender; var tag = item.DataContext as Tag; if (tag == null) { return; } DragHelper.SetClick(new DragElement((IDragElement)tag, TagGrp), e); e.Handled = false; }
private void Tag_OnPreviewMouseDown(object sender, MouseButtonEventArgs e) { var element = (FrameworkElement)sender; Tag tag = element.DataContext as Tag; if (tag == null) { return; } var dragElement = new DragProcessor.DragElement((DragProcessor.IDragElement)tag, WorkSpace.Instance.ActiveField); DragHelper.SetClick(dragElement, e); }
private void Node_OnPreviewMouseDown(object sender, MouseButtonEventArgs e) { var nodeCtrl = sender as NodeCotrol; if (nodeCtrl != null && nodeCtrl.IsDraEnable) { var nodes = new List <Node>(SelectedNodes); var node = ((FrameworkElement)sender).DataContext as Node; if (!nodes.Contains(node)) { nodes.Add(node); } var data = new DragProcessor.DragElement(nodes, CurTag); DragHelper.SetClick(data, e); e.Handled = false; } }