public void OnMouseMove(Point pt)
        {
            if (Disabled)
            {
                return;
            }

            // hover thumb
            if (ThumbRectangle.Contains(pt))
            {
                IsHovered = true;
            }
            else
            {
                if (IsHovered)
                {
                    IsHovered = false;
                }
            }

            // moving thumb?
            if (IsPressed)
            {
                if (Orientation == ScrollOrientation.VerticalScroll)
                {
                    ChangeThumbPos(pt.Y - PosOnThumb);
                }
                else
                {
                    ChangeThumbPos(pt.X - PosOnThumb);
                }
            }
        }
Beispiel #2
0
 public void CaclculateHitInfo(Point mousePosition)
 {
     if (this.OwnerEdit != null && this.OwnerEdit.IsDesignMode)
     {
         return;
     }
     else
     {
         if (ThumbRectangle.Contains(mousePosition))
         {
             ThumbButtonState = DevExpress.Utils.Drawing.ObjectState.Hot;
             BodyState        = DevExpress.Utils.Drawing.ObjectState.Normal;
             return;
         }
         else
         {
             ThumbButtonState = DevExpress.Utils.Drawing.ObjectState.Normal;
         }
         BodyState = BodyRectangle.Contains(mousePosition) ? DevExpress.Utils.Drawing.ObjectState.Hot : DevExpress.Utils.Drawing.ObjectState.Normal;
     }
 }