public void Show()
 {
     IsVisible = true;
     MainContent.FadeTo(1);
     MainContent.TranslateTo(MainContent.TranslationX, 0);
     ShadowView.IsVisible = true;
 }
 private void ShowSIDConfirmBox()
 {
     PopupContainer.IsVisible = true;
     MainContent.FadeTo(1);
     MainContent.TranslateTo(MainContent.TranslationX, 0);
     ShadowView.IsVisible = true;
 }
 public void Show(QuaddieGroup quaddie)
 {
     QuaddieLayout.Children.Clear();
     QuaddieLayout.Children.Add(GenerateQuaddieView(quaddie));
     IsVisible = true;
     MainContent.FadeTo(1);
     MainContent.TranslateTo(MainContent.TranslationX, 0);
     ShadowView.IsVisible = true;
 }
示例#4
0
        public async void HeaderMenuToggle_OnClick(object sender, EventArgs e)
        {
            if (MenuGrid.TranslationY == 0)
            {
                //MenuGrid.TranslationY = -500;
                MenuGrid.HeightRequest = 0;
                MenuGrid.TranslateTo(0, -1000, 200);
            }

            else
            {
                //MenuGrid.TranslationY = 0;
                MenuGrid.HeightRequest = 1000;
                MenuGrid.TranslateTo(0, 0, 200);
            }

            if (MainContent.TranslationY < 1000)
            {
                // MainContent.TranslationY = 500;
                MainContent.HeightRequest = 0;
                MainContent.TranslateTo(0, 1000, 200);
            }

            else
            {
                //MainContent.TranslationY = 0;
                MainContent.HeightRequest = 1000;
                MainContent.TranslateTo(0, 0, 200);
            }

            //VisualStateManager.Bind(this.Parent.LogicalChildren.First(), StateManager);
            //var currentState = StateManager.CurrentState<MainMenuStates>();

            //if (currentState == MainMenuStates.ShowMenu)
            //{
            //   await StateManager.GoToState(MainMenuStates.HideMenu);
            //}

            //else
            //{
            //    try
            //    {
            //        await StateManager.GoToState(MainMenuStates.ShowMenu);
            //    }
            //    catch (Exception exception)
            //    {
            //        Console.WriteLine(exception);
            //        throw;
            //    }
            //}
        }
示例#5
0
        void ToggleFlyout()
        {
            if (_isFlyoutOpen)
            {
                MainContent.ScaleTo(_scale, _flyoutSpeed);
                MainContent.TranslateTo(_pagePositionX, Flyout.TranslationY, _flyoutSpeed);
                MainContent.CornerRadius = 0;
            }
            else
            {
                MainContent.ScaleTo(_scale * .9, _flyoutSpeed);
                MainContent.TranslateTo(Flyout.TranslationX + _flyoutTranslationX, Flyout.TranslationY, _flyoutSpeed);
                MainContent.CornerRadius = FlyoutCornerRadius;
            }

            _isFlyoutOpen = !_isFlyoutOpen;
        }