Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MAUI/Maui.Samples/AppShell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private async Task CheckApiKey()
ApiKeyStatus status = await ApiKeyManager.CheckKeyValidity();
if (status != ApiKeyStatus.Valid)
{
await Navigation.PushAsync(new ApiKeyPage(), true);
await Shell.Current.Navigation.PushAsync(new ApiKeyPage(), true);
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private async void OnSublayersClicked(object sender, EventArgs e)
};

// Navigate to the sublayers page
await Navigation.PushAsync(sublayersPage);
await Shell.Current.Navigation.PushAsync(sublayersPage);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private async void MyMapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.Mau
}

// Show a page with the HTML content
await Navigation.PushAsync(new KmlIdentifyResultDisplayPage(firstIdentifiedPlacemark.BalloonContent));
await Shell.Current.Navigation.PushAsync(new KmlIdentifyResultDisplayPage(firstIdentifiedPlacemark.BalloonContent), false);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private async void MyMapView_GeoViewTapped(object sender, Esri.ArcGISRuntime.Mau
}

// Show a page with the HTML content
await Navigation.PushAsync(new WmsIdentifyResultDisplayPage(htmlContent));
await Shell.Current.Navigation.PushAsync(new WmsIdentifyResultDisplayPage(htmlContent));
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void ShowSaveMapUI(object sender, EventArgs e)
mapInputForm.OnSaveClicked += SaveMapAsync;

// Navigate to the SaveMapPage UI.
Navigation.PushAsync(mapInputForm);
Shell.Current.Navigation.PushAsync(mapInputForm);
}

// Event handler to get information entered by the user and save the map.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ private void ShowDirections_Clicked(object sender, EventArgs e)

private async Task ShowDirectionsTask()
{
await Navigation.PushAsync(_directionsPage);
await Shell.Current.Navigation.PushAsync(_directionsPage);
}

private async Task<PictureMarkerSymbol> GetPictureMarker()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private async Task<Credential> CreateCredentialAsync(CredentialRequestInfo info)

// Show the login controls on the UI thread.
// OnLoginInfoEntered event will return the values entered (username and password).
Microsoft.Maui.ApplicationModel.MainThread.BeginInvokeOnMainThread(async () => await Navigation.PushAsync(_loginPage));
Microsoft.Maui.ApplicationModel.MainThread.BeginInvokeOnMainThread(async () => await Shell.Current.Navigation.PushAsync(_loginPage));

// Return the login task, the result will be ready when completed (user provides login info and clicks the "Login" button)
return await _loginTaskCompletionSrc.Task;
Expand Down
4 changes: 2 additions & 2 deletions src/MAUI/Maui.Samples/Views/CategoryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ private async void FeedbackToolbarItem_Clicked(object sender, EventArgs e)

private async void SettingsClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new SettingsPage(), true);
await Shell.Current.Navigation.PushAsync(new SettingsPage(), true);
}

private async void SearchClicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new SearchPage(), false);
await Shell.Current.Navigation.PushAsync(new SearchPage(), false);
}

// The favorites icon can flicker when using a pen as pointer.
Expand Down