//Xの絶対値が大きければ横方向のスクロールで、そうでなければ縦方向らしい
if (Math.Abs(e.Cumulative.Translation.X) < Math.Abs(e.Cumulative.Translation.Y))
{
- //下に動かした場合はマイナスの値が飛んでくる、上に動かした場合はプラスの値が飛んでくる
- if(!this.View.TryRelativeScroll(0, -translation.Y, true))
- {
- this.View.IsFocused = false;
- this.Document.SelectGrippers.BottomLeft.Enabled = false;
- this.Document.SelectGrippers.BottomRight.Enabled = false;
- this.Refresh();
- }
+ int deltay = (int)Math.Abs(Math.Ceiling(translation.Y));
+ if (translation.Y < 0)
+ this._Controller.ScrollByPixel(ScrollDirection.Down, deltay, false, false);
+ else
+ this._Controller.ScrollByPixel(ScrollDirection.Up, deltay, false, false);
+ this.View.IsFocused = false;
+ this.Document.SelectGrippers.BottomLeft.Enabled = false;
+ this.Document.SelectGrippers.BottomRight.Enabled = false;
+ this.Refresh();
return;
}