Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        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);
        }
Example #4
0
        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;
            }
        }