PrismLibrary/Prism · error · NavigationException
NavigationException.NoPageIsRegistered
NavigationException.NoPageIsRegistered
Error message
NavigationException.NoPageIsRegistered
What it means
The parameterless-segment TabbedSegmentBuilder constructor queries the registry for TabbedPage registrations and throws NavigationException(NoPageIsRegistered) when none exist. Prism cannot pick a default TabbedPage segment name without a registration.
Solutions
- Register TabbedPage: `registry.RegisterForNavigation<TabbedPage>(nameof(TabbedPage));` before creating tabs.
- Use the TabbedSegmentBuilder(builder, segmentName) overload only after ensuring a matching named registration exists.
- Confirm the registration module/extension that adds TabbedPage actually runs at app startup.
Example fix
// before builder.AddNavigationPage(b => b.AddTabbedSegment()); // throws: no TabbedPage registered // after registry.RegisterForNavigation<TabbedPage>(nameof(TabbedPage)); builder.AddNavigationPage(b => b.AddTabbedSegment());
Defensive patterns
Strategy: validation
Validate before calling
if (!((IRegistryAware)builder).Registry.ViewsOfType(typeof(TabbedPage)).Any())
throw new InvalidOperationException("Register TabbedPage before creating a tabbed segment"); Type guard
null
Try / catch
try { builder.AddNavigationPage(b => b.AddTabbedSegment()); }
catch (NavigationException ex) when (ex.Code == NavigationException.NoPageIsRegistered)
{
// register TabbedPage at startup or use a different segment type
} Prevention
- Register TabbedPage (RegisterForNavigation<TabbedPage>) during app init
- Run registration modules before first navigation
- Write a startup test asserting TabbedPage appears in ViewsOfType
When it happens
Trigger: Calling `new TabbedSegmentBuilder(navigationBuilder)` (or an API that constructs it, like a builder AddTabbedSegment overload) when the IViewRegistry has no registration for typeof(TabbedPage).
Common situations: Apps using TabbedPage without registering it in the Prism registry; MAUI Shell apps migrated to Prism where TabbedPage registration was skipped; missing `RegisterForNavigation<TabbedPage>` call at startup.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- NavigationException.NoPageIsRegistered
- The builder does not implement IRegistryAware
- configureSegment
- No Registration found to select tab
- The page type ' ' is not supported.
AI-assisted analysis of PrismLibrary/Prism@358118cd64 (2026-09-15).
Data as JSON: /api/errors/658218cd5bb3ef20.
Report an issue: GitHub.
Appendix: source
Thrown at src/Maui/Prism.Maui/Navigation/Builder/TabbedSegmentBuilder.cs:21
namespace Prism.Navigation.Builder;
internal class TabbedSegmentBuilder : ITabbedSegmentBuilder, IConfigurableSegmentName, IUriSegment, IRegistryAware
{
private INavigationParameters _parameters { get; }
private INavigationBuilder _builder { get; }
public TabbedSegmentBuilder(INavigationBuilder builder)
{
_builder = builder;
_parameters = new NavigationParameters();
if (builder is not IRegistryAware registryAware)
throw new Exception("The builder does not implement IRegistryAware");
var registrations = registryAware.Registry.ViewsOfType(typeof(TabbedPage));
if (!registrations.Any())
throw new NavigationException(NavigationException.NoPageIsRegistered, nameof(TabbedPage));
var registration = registrations.Last();
SegmentName = registration.Name;
}
public TabbedSegmentBuilder(INavigationBuilder builder, string segmentName)
{
_builder = builder;
_parameters = new NavigationParameters();
if (builder is not IRegistryAware registryAware)
throw new Exception("The builder does not implement IRegistryAware");
var registration = registryAware.Registry.ViewsOfType(typeof(TabbedPage)).FirstOrDefault(x => x.Name == segmentName);
if (registration == null)
throw new NavigationException(NavigationException.NoPageIsRegistered, nameof(TabbedPage));
SegmentName = registration.Name;View on GitHub (pinned to 358118cd64)