AzureMLDemo.MainPage.OnNavigatedTo C# (CSharp) Method

OnNavigatedTo() protected method

Invoked when this page is about to be displayed in a Frame.
protected OnNavigatedTo ( NavigationEventArgs e ) : void
e Windows.UI.Xaml.Navigation.NavigationEventArgs
return void
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // checks if endpoint settings was privided
            // if not, prints a disclamer and disables "Get estimate" button
            if (String.IsNullOrWhiteSpace(_apiKey) || String.IsNullOrWhiteSpace(_requestUri))
            {
                tbResult.Text = "Additional configuration is needed!\nIt looks like you have forgoten to provide your requestUri and apiKey in MainPage.xaml.cs.\nPlease make requested modifications and redeploy the app.";
                btnGetEstimate.IsEnabled = false;
            }

            base.OnNavigatedTo(e);
        }