Esempio n. 1
0
        private async void TapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            await((Frame)sender).ScaleTo(0, 50, Easing.Linear);
            await Task.Delay(100);

            await((Frame)sender).ScaleTo(1, 50, Easing.Linear);

            FloatMenuItem1.IsVisible = true;
            await FloatMenuItem1.TranslateTo(0, 0, 100);

            await FloatMenuItem1.TranslateTo(0, -20, 100);

            await FloatMenuItem1.TranslateTo(0, 0, 200);

            FloatMenuItem2.IsVisible = true;
            await FloatMenuItem2.TranslateTo(0, 0, 100);

            await FloatMenuItem2.TranslateTo(0, -20, 100);

            await FloatMenuItem2.TranslateTo(0, 0, 200);

            FloatMenuItem3.IsVisible = true;
            await FloatMenuItem3.TranslateTo(0, 0, 100);

            await FloatMenuItem3.TranslateTo(0, -20, 100);

            await FloatMenuItem3.TranslateTo(0, 0, 200);
        }
Esempio n. 2
0
        private async void TapGestureRecognizer_OnTapped(object sender, EventArgs e)
        {
            if (isOpen == false)
            {
                isOpen = true;
                FloatMenuItem1.IsVisible = true;
                await FloatMenuItem1.TranslateTo(0, 0, 100);

                await FloatMenuItem1.TranslateTo(0, -20, 100);

                await FloatMenuItem1.TranslateTo(0, 0, 200);

                FloatMenuItem2.IsVisible = true;
                await FloatMenuItem2.TranslateTo(0, 0, 100);

                await FloatMenuItem2.TranslateTo(0, -20, 100);

                await FloatMenuItem2.TranslateTo(0, 0, 200);
            }
            else
            {
                isOpen = false;
                await FloatMenuItem1.TranslateTo(0, 0, 100);

                await FloatMenuItem1.TranslateTo(0, -20, 100);

                await FloatMenuItem1.TranslateTo(0, 0, 200);

                FloatMenuItem1.IsVisible = false;

                await FloatMenuItem2.TranslateTo(0, 0, 100);

                await FloatMenuItem2.TranslateTo(0, -20, 100);

                await FloatMenuItem2.TranslateTo(0, 0, 200);

                FloatMenuItem2.IsVisible = false;
            }
        }
Esempio n. 3
0
        private async void TapGestureRecognizer_OnTapped(object sender, EventArgs e)
        {
            if (isOpen == false)
            {
                isOpen = true;
                //Scale to smaller
                await((Frame)sender).ScaleTo(0.8, 50, Easing.Linear);
                //Wait a moment
                await Task.Delay(100);

                //Scale to normal
                await((Frame)sender).ScaleTo(1, 50, Easing.Linear);

                //Show FloatMenuItem1
                FloatMenuItem1.IsVisible = true;
                await FloatMenuItem1.TranslateTo(0, 0, 100);

                await FloatMenuItem1.TranslateTo(0, -20, 100);

                await FloatMenuItem1.TranslateTo(0, 0, 200);

                //Show FloatMenuItem2
                FloatMenuItem2.IsVisible = true;
                await FloatMenuItem2.TranslateTo(0, 0, 100);

                await FloatMenuItem2.TranslateTo(0, -20, 100);

                await FloatMenuItem2.TranslateTo(0, 0, 200);

                //Show FloatMenuItem3
                FloatMenuItem3.IsVisible = true;
                await FloatMenuItem3.TranslateTo(0, 0, 100);

                await FloatMenuItem3.TranslateTo(0, -20, 100);

                await FloatMenuItem3.TranslateTo(0, 0, 200);
            }
            else
            {
                isOpen = false;
                //Scale to smaller
                await((Frame)sender).ScaleTo(0.8, 50, Easing.Linear);
                //Wait a moment
                await Task.Delay(100);

                //Scale to normal
                await((Frame)sender).ScaleTo(1, 50, Easing.Linear);

                //Hide FloatMenuItem1
                await FloatMenuItem1.TranslateTo(0, 0, 100);

                await FloatMenuItem1.TranslateTo(0, -20, 100);

                await FloatMenuItem1.TranslateTo(0, 0, 200);

                FloatMenuItem1.IsVisible = false;

                //Hide FloatMenuItem2
                await FloatMenuItem2.TranslateTo(0, 0, 100);

                await FloatMenuItem2.TranslateTo(0, -20, 100);

                await FloatMenuItem2.TranslateTo(0, 0, 200);

                FloatMenuItem2.IsVisible = false;

                //Hide FloatMenuItem3
                await FloatMenuItem3.TranslateTo(0, 0, 100);

                await FloatMenuItem3.TranslateTo(0, -20, 100);

                await FloatMenuItem3.TranslateTo(0, 0, 200);

                FloatMenuItem3.IsVisible = false;
            }
        }