private void AnimatePivotItemTransition(bool fromLeft, string previousHeader) { this.currentFromLeft = false; StoryBoard.Play(new FunctionBasedAnimation(FunctionBasedAnimation.Functions.SoftedFluid) { Duration = 300, From = fromLeft ? -this.Size.Width : this.CalculateHeaderSize(previousHeader).Width, // this.Size.Width, To = 0, OnAnimation = v => this.offsetForHeaders = v }, new FunctionBasedAnimation(FunctionBasedAnimation.Functions.SoftedFluidExtended) { Duration = 600, From = fromLeft ? -this.Size.Width : this.Size.Width, To = 0, OnAnimation = v => this.offsetForBody = v }, this.CurrentItem.GetDelayedAnimation(fromLeft ? -this.Size.Width : this.Size.Width), new CommitStoryboardAnimation { Duration = 600, CommitAction = this.Update }); }