public void SwipeTo(SwipeDirection direction, SwipeConfig config, bool animated) { var targetWidth = config.TriggerActionTargetWidth; var targetX = config.Direction == SwipeDirection.Left ? targetWidth : -targetWidth; config.AdjustForSwipeToFixStarted(); var clipScaleX = targetWidth; if (animated) { DisplayAnimation(config, targetX, clipScaleX, () => { config.AdjustForSwipeFixCompleted(targetWidth); }); } else { config.MainTransform.X = targetX; config.AdjustForSwipeFixCompleted(targetWidth); } }
public void SwipeTo(SwipeDirection direction, SwipeConfig config, bool animated) { var targetWidth = config.TriggerActionTargetWidth; var targetX = config.Direction == SwipeDirection.Left ? targetWidth : -targetWidth; config.AdjustForSwipeToFixStarted(); var clipScaleX = targetWidth; if (animated) { DisplayAnimation(config, targetX, clipScaleX, () => { config.AdjustForSwipeFixCompleted(targetWidth); }); } else { config.MainTransform.X = targetX; config.AdjustForSwipeFixCompleted(targetWidth); } }