diff --git a/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/LoginPage.xaml.cs b/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/LoginPage.xaml.cs index e91983bdc6..45823ab900 100644 --- a/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/LoginPage.xaml.cs +++ b/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/LoginPage.xaml.cs @@ -51,7 +51,7 @@ private void LoginButtonClicked(object sender, EventArgs e) private void CancelButtonClicked(object sender, EventArgs e) { - // Fire the OnCanceled event to let the calling code no the login was canceled. + // Fire the OnCanceled event to let the calling code know the login was canceled. if (OnCanceled != null) { OnCanceled(this, null); diff --git a/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/TokenSecuredChallenge.xaml.cs b/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/TokenSecuredChallenge.xaml.cs index 57bbebe783..7f6af46d8e 100644 --- a/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/TokenSecuredChallenge.xaml.cs +++ b/src/MAUI/Maui.Samples/Samples/Security/TokenSecuredChallenge/TokenSecuredChallenge.xaml.cs @@ -138,9 +138,9 @@ private async void LoginInfoEntered(object sender, LoginEventArgs e) finally { // Dismiss the login controls. - if (Navigation.NavigationStack.OfType().Any()) + if (Shell.Current.Navigation.NavigationStack.OfType().Any()) { - await Navigation.PopAsync(); + _ = Shell.Current.Navigation.PopAsync(); } } } @@ -148,7 +148,7 @@ private async void LoginInfoEntered(object sender, LoginEventArgs e) private void LoginCanceled(object sender, EventArgs e) { // Dismiss the login controls. - Navigation.PopAsync(); + _ = Shell.Current.Navigation.PopAsync(); // Cancel the task completion source task. _loginTaskCompletionSrc.TrySetCanceled();