Esempio n. 1
0
        private void ShowCurrentAndRecentLocationStack()
        {
            CurrentAndRecentLocationStack.IsVisible = true;
            var currentAndRecentLocationSize = CurrentAndRecentLocationStack.Measure(double.PositiveInfinity, double.PositiveInfinity);

            var heightToBeSet = Math.Max(currentAndRecentLocationSize.Request.Height, _currentAndRecentLocationStackSizeRequest.Request.Height);

            CurrentAndRecentLocationStack.Animate("ShowCurrentAndRecentLocationStack", (x) =>
            {
                CurrentAndRecentLocationStack.HeightRequest = heightToBeSet * x;
            }, length: AppThemeConstants.AnimationSpeed, easing: Easing.SinInOut);
        }
Esempio n. 2
0
        private void HideCurrentAndRecentLocationStack()
        {
            var currentAndRecentLocationSize = CurrentAndRecentLocationStack.Measure(double.PositiveInfinity, double.PositiveInfinity);

            if (currentAndRecentLocationSize.Request.Height > _currentAndRecentLocationStackSizeRequest.Request.Height)
            {
                _currentAndRecentLocationStackSizeRequest = currentAndRecentLocationSize;
            }

            CurrentAndRecentLocationStack.Animate("HideCurrentAndRecentLocationStack", (x) =>
            {
                CurrentAndRecentLocationStack.HeightRequest = currentAndRecentLocationSize.Request.Height * (1 - x);
            }, length: AppThemeConstants.AnimationSpeed, easing: Easing.SinInOut, finished: (x, y) =>
            {
                CurrentAndRecentLocationStack.IsVisible = false;
            });
        }