private int GetMovingOffset(Point ptMouse) { Rectangle rect = this.GetSplitterOutlineBounds(ptMouse); if (this.DragSource.IsVertical) return rect.X - this.RectSplitter.X; else return rect.Y - this.RectSplitter.Y; }