public DraggingWindow(Point startPoint, Point deltaPoint, DragData data) { Data = data; Width = Data.InitialSize.Width; Height = Data.InitialSize.Height; Left = startPoint.X; Top = startPoint.Y; MouseDeltaPoint = deltaPoint; InitializeComponent(); RootTabs.Background = Data.TabRoot.Background; RootTabs.Foreground = Data.TabRoot.Foreground; RootTabs.TabStripPlacement = Data.TabRoot.TabStripPlacement; RootTabs.ShowIcon = Data.TabRoot.ShowIcon; RootTabs.RealChildren.Add(Data.Element); RootTabs.RealChildren.CollectionChanged += RealChildrenCollectionChanged; }
private static void OnDraged(DraggingWindow window, Point screenPos, DragData data) { ZOrderWindows = null; //LoacationChanged(Draging) must happen before DragMove finished(Drop) if (LastDragPoint != null) { ((DraggableTabControl)window.Content).RealChildren.Clear(); window.Close(); LastDragPoint.OnDragDrop(data, ((FrameworkElement)LastDragPoint).PointFromScreen(screenPos)); LastDragPoint = null; } else { window.ToNormalWindow(); } }
private static void OnDraging(DraggingWindow window, Point screenPos, DragData data) { ProbeDrag(screenPos, data); }