protected override void OnDragDelta() { var newValue = _resized = _resized + MouseDeltaX; newValue = Math.Max(newValue, MinLength); newValue = Math.Min(newValue, MaxLength); _resized += newValue - _resized; _gridTrack.Resize(new GridLength(newValue, GridUnitType.Pixel)); }
protected override void OnEndDrag(UIElement dragElement, bool abort) { if (abort) { ResizeTo(_oldValue); } else if (IsShiftKeyDown) { _gridTrack.Resize(_rowPresenter.GetLength(_gridTrack)); } }