ApiAiDemo.App.NavigateToMain C# (CSharp) Метод

NavigateToMain() приватный Метод

private NavigateToMain ( ApiAiSDK.Model.AIResponse aiResponse ) : void
aiResponse ApiAiSDK.Model.AIResponse
Результат void
        private void NavigateToMain(AIResponse aiResponse)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            rootFrame.Navigate(typeof(MainPage), aiResponse);

            // Ensure the current window is active
            Window.Current.Activate();
        }
    }