internal void CloseRedArrowIndicator() { if (redArrowIndicatorDragHelper != null) { redArrowIndicatorDragHelper.EndDrag(); redArrowIndicatorDragHelper.DragWindow.Paint -= new PaintEventHandler(DragWindow_Paint); redArrowIndicatorDragHelper = null; } redArrowOpend = false; }
internal void OpenRedArrowIndicator() { if (!ShouldOpenArrow(false)) { return; } redArrowOpend = true; Bitmap bm = CreateRedArrowIndicatorBitmap(); redArrowIndicatorDragHelper = new DragFieldHelper(); redArrowIndicatorDragHelper.StartDrag(bm, hiddenPoint, DragDropEffects.Move); // There is always a small black rectangle at the lower right-corner. Drawing // over the previously painted BackgroundImage resolves this issue. redArrowIndicatorDragHelper.DragWindow.Paint += new PaintEventHandler(DragWindow_Paint); if (!DragFieldMouseControllerBase.SupportsTransparentForm()) { //GridRangeInfo rows = GetRangeOfColumnHeaderSection(); int rowIndex = grid.Model.RowCount > 1 ? 2 : 0;//rows.Top; GridStyleInfo style = grid.Model[rowIndex, 0]; Color backColor = Color.FromArgb(255, style.Interior.BackColor); redArrowIndicatorDragHelper.DragWindow.BackColor = backColor; } }