void ShowServo(bool immediate = false) { uint delay = 500; if (immediate) { delay = 0; } UrlView.TranslateTo(0, 0, delay, Easing.SpringOut); ServoView.TranslateTo(0, 0, delay, Easing.SpringOut); StatusView.ScaleTo(1, delay, Easing.Linear); _viewModel.ToolbarHeight = (int)ServoView.Bounds.Top; }
void HideServo(bool immediate = false) { uint delay = 500; var deviceFactor = 1; var offset = 0.25; if (immediate) { delay = 0; } if (Device.RuntimePlatform == Device.macOS) { deviceFactor = -1; offset = 0.5; } UrlView.TranslateTo(0, deviceFactor * offset * ServoView.Bounds.Height, delay, Easing.SpringIn); ServoView.TranslateTo(0, deviceFactor * ServoView.Bounds.Height, delay, Easing.SpringIn); StatusView.ScaleTo(0, delay, Easing.Linear); }