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);
        }
Example #2
0
        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);
        }
Example #4
0
 public FloatingWindowContentHost(LayoutFloatingWindowControl owner)
 {
     _owner = owner;
     var manager = _owner.Model.Root.Manager;
 }
Example #5
0
 void IOverlayWindow.DragLeave(LayoutFloatingWindowControl floatingWindow)
 {
     Visibility      = System.Windows.Visibility.Hidden;
     _floatingWindow = null;
 }
Example #6
0
 void IOverlayWindow.DragEnter(LayoutFloatingWindowControl floatingWindow)
 {
     _floatingWindow = floatingWindow;
     EnableDropTargets();
 }