Exemplo n.º 1
0
        public void ChangeWindow(string newWindowName, bool addToStack = true)
        {
            var newGo = _cachedWindows[newWindowName];

            NewWindow = GetWindow(newGo);

            if (CurrentWindow != null)
            {
                ClosePreviousWindow(CurrentWindow);
            }
            if (CurrentWindow == null ||
                NewWindow.PartnerNavigationWindow() != GetWindow(CurrentWindow).PartnerNavigationWindow())
            {
                ChangeNavigationWindow(NewWindow.PartnerNavigationWindow());
            }
            AppData.Ref.BlackBackground.SetActive(NewWindow.UseBlackBackground());
            AppSession.CurrentBackButtonBehavior = NewWindow.SetBackButtonBehavior();
            CurrentWindow = newGo;
            NewWindow.Setup();
            newGo.SetActive(true);
            _windowIsStackable = addToStack;
        }