Dreamescaper / BlazorBindings.Maui

MAUI Blazor Bindings - Build native and hybrid MAUI apps with Blazor
MIT License
242 stars 16 forks source link

Can't inject ShellNavigationManager to razor pages #145

Closed rstreit closed 10 months ago

rstreit commented 10 months ago

"'ShellNavigationManager' is inacessible due to its protection level."

Is there any way or work arround to do page navigation?

Dreamescaper commented 10 months ago

Inject INavigation interface, and use NavigateToAsync method. Take a look at the following sample: https://github.com/Dreamescaper/BlazorBindings.Maui/blob/main/samples/ControlGallery/Views/Navigation/UriNavigationPage.razor

rstreit commented 10 months ago

It's working as expected with INavigation. Nice samples, thanks!