Ejemplo n.º 1
0
        /// <summary>
        /// Propogates a request for drag targets down the hierarchy of docking elements.
        /// </summary>
        /// <param name="floatingWindow">Reference to window being dragged.</param>
        /// <param name="dragData">Set of pages being dragged.</param>
        /// <param name="targets">Collection of drag targets.</param>
        public override void PropogateDragTargets(KryptonFloatingWindow floatingWindow,
                                                  PageDragEndData dragData,
                                                  DragTargetList targets)
        {
            if (FloatspaceControl.CellVisibleCount > 0)
            {
                // Create list of the pages that are allowed to be dropped into this floatspace
                KryptonPageCollection pages = new KryptonPageCollection();
                foreach (KryptonPage page in dragData.Pages)
                {
                    if (page.AreFlagsSet(KryptonPageFlags.DockingAllowFloating))
                    {
                        pages.Add(page);
                    }
                }

                // Do we have any pages left for dragging?
                if (pages.Count > 0)
                {
                    DragTargetList floatspaceTargets = FloatspaceControl.GenerateDragTargets(new PageDragEndData(this, pages), KryptonPageFlags.DockingAllowFloating);
                    targets.AddRange(floatspaceTargets.ToArray());
                }
            }
        }