ComponentFactory.Krypton.Docking.DragTargetControlEdge.DragTargetControlEdge C# (CSharp) Method

DragTargetControlEdge() public method

Initialize a new instance of the DragTargetControlEdge class.
public DragTargetControlEdge ( Rectangle screenRect, Rectangle hotRect, Rectangle drawRect, DragTargetHint hint, KryptonDockingControl controlElement, KryptonPageFlags allowFlags, bool outsideEdge ) : System
screenRect System.Drawing.Rectangle Rectangle for screen area.
hotRect System.Drawing.Rectangle Rectangle for hot area.
drawRect System.Drawing.Rectangle Rectangle for draw area.
hint DragTargetHint Target hint which should be one of the edges.
controlElement KryptonDockingControl Workspace instance that contains cell.
allowFlags KryptonPageFlags Only drop pages that have one of these flags defined.
outsideEdge bool Add to the outside edge (otherwise the inner edge).
return System
        public DragTargetControlEdge(Rectangle screenRect,
                                     Rectangle hotRect,
                                     Rectangle drawRect,
                                     DragTargetHint hint,
                                     KryptonDockingControl controlElement,
                                     KryptonPageFlags allowFlags,
                                     bool outsideEdge)
            : base(screenRect, hotRect, drawRect, hint, allowFlags)
        {
            _controlElement = controlElement;
            _outsideEdge = outsideEdge;

            // Find the orientation by looking for a matching hint (we need to exclude flags from the hint enum)
            switch (hint & DragTargetHint.ExcludeFlags)
            {
                case DragTargetHint.Transfer:
                case DragTargetHint.EdgeLeft:
                    _edge = VisualOrientation.Left;
                    break;
                case DragTargetHint.EdgeRight:
                    _edge = VisualOrientation.Right;
                    break;
                case DragTargetHint.EdgeTop:
                    _edge = VisualOrientation.Top;
                    break;
                case DragTargetHint.EdgeBottom:
                    _edge = VisualOrientation.Bottom;
                    break;
                default:
                    Debug.Assert(false);
                    throw new ArgumentOutOfRangeException("Hint must be an edge value.");
            }
        }