private void MoveStart(object sender, MouseEventArgs e) { if (_control is IMoveable) { IMoveable c = (IMoveable)_control; if (!c.Moving && c.DragBounds.Contains(e.Position)) { c.OnDragStart(e); _moving = true; } } }
protected virtual void MoveStart(object sender, MouseEventArgs e) { if (_owner.Viewport.Bounds.Contains(e.Position)) { Control c = _owner.Children.GetItemAtPoint(e.Position); if (_movingItem == null && c != null) { if (c is IMoveable) { IMoveable movingItem = (IMoveable)c; if (movingItem.DragBounds.Contains(e.Position)) { _movingItem = (IMoveable)c; _movingItem.OnDragStart(e); } } } } }