Bildschirmseite zur Aufnahme von Controls.
Inheritance: MonoGameUi.ContainerControl
        private bool Navigate(Screen screen, bool isBackNavigation, object parameter = null)
        {
            bool overlayed = false;

            // Navigation ankündigen und prüfen, ob das ok geht.
            NavigationEventArgs args = new NavigationEventArgs()
            {
                IsBackNavigation = isBackNavigation,
                Parameter = parameter,
                Screen = screen,
            };

            // Schritt 1: Vorherigen Screen "abmelden"
            if (ActiveScreen != null)
            {
                overlayed = activeScreen.IsOverlay;

                ActiveScreen.InternalNavigateFrom(args);

                // Abbruch durch Screen eingeleitet
                if (args.Cancel) { return false; }

                // Screen deaktivieren
                ActiveScreen.Enabled = false;

                // Spezialfall (aktueller Screen nicht in History, neuer Screen Overlay)
                if (!ActiveScreen.InHistory && screen != null && screen.IsOverlay)
                    historyStack.Insert(0, ActiveScreen);

                // Ausblenden, wenn der neue Screen nicht gerade ein Overlay ist
                if (screen == null || !screen.IsOverlay)
                {
                    // Überblenden, falls erforderlich
                    if (NavigateFromTransition != null)
                    {
                        ActiveScreen.Alpha = 1f;
                        var trans = NavigateFromTransition.Clone(ActiveScreen);
                        trans.Finished += (s, e) =>
                        {
                            ScreenTarget.Controls.Remove(e);
                        };
                        activeScreen.StartTransition(trans);
                    }
                    else
                    {
                        ScreenTarget.Controls.Remove(ActiveScreen);
                    }
                }

                // NavigatedFrom-Event aufrufen
                args.Cancel = false;
                args.Handled = false;
                args.IsBackNavigation = isBackNavigation;
                args.Screen = screen;
                ActiveScreen.InternalNavigatedFrom(args);

                // entfernen
                args.Screen = ActiveScreen;
                ActiveScreen = null;
            }
            else args.Screen = null;

            // Schritt 2: zum neuen Screen navigieren
            if (screen != null)
            {
                // NavigateTo-Event aufrufen
                args.Cancel = false;
                args.Handled = false;
                args.IsBackNavigation = isBackNavigation;
                screen.InternalNavigateTo(args);

                // Neuen Screen einhängen
                if (historyStack.Contains(screen))
                    historyStack.Remove(screen);
                if (screen.InHistory)
                    historyStack.Insert(0, screen);

                if (!overlayed)
                {
                    if (NavigateToTransition != null)
                    {
                        screen.Alpha = 0f;
                        var trans = NavigateToTransition.Clone(screen);
                        screen.StartTransition(trans);
                    }
                    ScreenTarget.Controls.Add(screen);
                }

                ActiveScreen = screen;
                ActiveScreen.Enabled = true;

                // Navigate-Events aufrufen
                args.Cancel = false;
                args.Handled = false;
                args.IsBackNavigation = isBackNavigation;
                ActiveScreen.InternalNavigatedTo(args);
            }

            return true;
        }
 public bool NavigateToScreen(Screen screen, object parameter = null)
 {
     return Navigate(screen, false, parameter);
 }