private void PresentPage() { if (_hasFinishedAnimation) { return; } var animationController = new Animation(); var fadeAnimation = new Animation(v => GridContainer.Opacity = v, 0, 1, Easing.CubicIn); var startOffset = GridContainer.Height * 0.10; var containerMove = new Animation( v => GridContainer.TranslationY = Lerp(startOffset, 0, v), 0, 1, Easing.CubicInOut); animationController.Add(0, 0.65, fadeAnimation); animationController.Add(0, 1, containerMove); animationController.Commit(this, AnimationEnter, 16, 500, null, async(d, b) => { await Task.Delay(500); CodeEntry.Focus(); _hasFinishedAnimation = true; }); }
protected override void OnAppearing() { base.OnAppearing(); Device.BeginInvokeOnMainThread(async() => { await System.Threading.Tasks.Task.Delay(150); CodeEntry.Focus(); }); }
public void FocusEntry() { CodeEntry.Focus(); }