示例#1
0
 public void finalizeDragPreview()
 {
     _dragContainer.Children.Remove(_dragPreview);
     _dragContainer.PreviewMouseMove -= Instance.dragSourceMouseMove;
     _dragContainer.PreviewMouseUp -= Instance.dragSourceMouseUp;
     _dragPreview = null;
 }
示例#2
0
 public static void SetDragPreview(DependencyObject element,DragPreviewControl value)
 {
     element.SetValue(DragPreviewProperty,value);
 }
示例#3
0
 public void dragSourceLeftButtonDown(object element,MouseButtonEventArgs e)
 {
     FrameworkElement dragsource = element as FrameworkElement;
     _dragPreview = GetDragPreview(dragsource);
     _dragContainer = (Canvas)FindAncestor(typeof(Canvas),dragsource);
     _dragContainer.Children.Add(_dragPreview);
     dragsource.PreviewMouseMove += Instance.dragSourceMouseMove;
     _dragContainer.PreviewMouseMove += Instance.dragSourceMouseMove;
     _dragContainer.PreviewMouseUp += Instance.dragSourceMouseUp;
     // 按下的时候根据
 }