IEnumerable <IDropArea> IOverlayWindowHost.GetDropAreas(LayoutFloatingWindowControl draggingWindow) { if (_dropAreas != null) { return(_dropAreas); } _dropAreas = new List <IDropArea>(); if (draggingWindow.Model is LayoutDocumentFloatingWindow) { return(_dropAreas); } var rootVisual = (Content as FloatingWindowContentHost).RootVisual; foreach (var areaHost in rootVisual.FindVisualChildren <LayoutAnchorablePaneControl>()) { _dropAreas.Add(new DropArea <LayoutAnchorablePaneControl>( areaHost, DropAreaType.AnchorablePane)); } foreach (var areaHost in rootVisual.FindVisualChildren <LayoutDocumentPaneControl>()) { _dropAreas.Add(new DropArea <LayoutDocumentPaneControl>( areaHost, DropAreaType.DocumentPane)); } return(_dropAreas); }
public DragService(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; _manager = floatingWindow.Model.Root.Manager; GetOverlayWindowHosts(); }
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow(LayoutFloatingWindowControl draggingWindow) { CreateOverlayWindow(); _overlayWindow.Owner = draggingWindow; _overlayWindow.EnableDropTargets(); _overlayWindow.Show(); return(_overlayWindow); }
public FloatingWindowContentHost(LayoutFloatingWindowControl owner) { _owner = owner; var manager = _owner.Model.Root.Manager; }
void IOverlayWindow.DragLeave(LayoutFloatingWindowControl floatingWindow) { Visibility = System.Windows.Visibility.Hidden; _floatingWindow = null; }
void IOverlayWindow.DragEnter(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; EnableDropTargets(); }