private void TryCreateInertia() { if (this.Size.Height > 0 && this.content.Size.Height > 0) { if (this.HorizontalScroll && this.horizontalInertia == null) { this.horizontalInertia = new GestureInertiaBehavior(v => { this.HorizontalOffset = v; this.Update(); }) { Min = -Math.Max(0, this.content.Size.Width - this.Size.Width), Max = 0, TrimPanning = TrimHorizontalPanning, }; } if (this.VerticalScroll && this.verticalInertia == null) { this.verticalInertia = new GestureInertiaBehavior(v => { this.VerticalOffset = v; this.Update(); }) { Min = -Math.Max(0, this.content.Size.Height - this.Size.Height), Max = 0, TrimPanning = TrimVerticalPanning, }; } } }
private void TryCreateInertia() { if (this.Size.Height > 0 && this._content.Size.Height > 0) { if (this.HorizontalScroll && this._horizontalInertia == null) { this._horizontalInertia = new GestureInertiaBehavior(v => { this.HorizontalOffset = v; this.Update(); }) { OnAnimationStart = OnStartScroll, OnAnimationStop = OnStopScroll, Min = -Math.Max(0, this._content.Size.Width - this.Size.Width), Max = 0, //! Fork: fleuxdesktop2, Change Set 8b81eb940370 TrimPanning = TrimHorizontalPanning, }; } if (this.VerticalScroll && this._verticalInertia == null) { this._verticalInertia = new GestureInertiaBehavior(v => { this.VerticalOffset = v; this.Update(); }) { OnAnimationStart = OnStartScroll, OnAnimationStop = OnStopScroll, Min = -Math.Max(0, this._content.Size.Height - this.Size.Height), Max = 0, //! Fork: fleuxdesktop2, Change Set 8b81eb940370 TrimPanning = TrimVerticalPanning, }; } } }