public void SwitchToSection(MenuSection section) { if (sectionStack.Count > 0) { //renderSetup.BeginPageTransition(); sectionStack.Peek().OnHide(false); } sectionStack.Push(section); section.OnShow(this); }
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); } } }