Esempio n. 1
0
        public void SwitchToSection(MenuSection section)
        {
            if (sectionStack.Count > 0)
            {
                //renderSetup.BeginPageTransition();
                sectionStack.Peek().OnHide(false);
            }

            sectionStack.Push(section);
            section.OnShow(this);
        }
Esempio n. 2
0
        public void LeaveSection(MenuSection section)
        {
            if (sectionStack.Count > 0)
            {
                MenuSection activeSection = sectionStack.Pop();
                if (activeSection != section)
                {
                    throw new InvalidOperationException();
                }

                //renderSetup.BeginPageTransition();

                activeSection.OnHide(true);

                if (sectionStack.Count > 0)
                {
                    sectionStack.Peek().OnShow(this);
                }
            }
        }