Beispiel #1
0
        private void OnDragOver(object sender, DragEventArgs e)
        {
            RibbonControl ribbonControl = sender as RibbonControl;
            Point         point         = ribbonControl.PointToClient(new Point(e.X, e.Y));
            RibbonHitInfo hitInfo       = ribbonControl.CalcHitInfo(point);

            e.Effect = DragDropEffects.None;
            if (hitInfo.InToolbar && hitInfo.Item != null && !(hitInfo.Item is DevExpress.XtraBars.Ribbon.Internal.RibbonQuickToolbarBarItemLink))
            {
                e.Effect = DragDropEffects.Move;
            }
        }
Beispiel #2
0
        private void OnDragDrop(object sender, DragEventArgs e)
        {
            RibbonControl ribbonControl = sender as RibbonControl;
            Point         point         = ribbonControl.PointToClient(new Point(e.X, e.Y));
            RibbonHitInfo hitInfo       = ribbonControl.CalcHitInfo(point);
            BarItemLink   targetLink    = hitInfo.Item;

            if (hitInfo.InToolbar && targetLink != null && !targetLink.Equals(link))
            {
                ReorderItems(ribbonControl, targetLink);
            }
            link = null;
        }