Table of Contents

Class AutoNavigationPageAttribute

Namespace
Nalu
Assembly
Nalu.Maui.Navigation.dll

Tunes what the Nalu navigation source generator registers (the generated AddPages()), with direction depending on the decorated class:

  • On a ContentPage-derived class — an opt-OUT knob: pages are discovered automatically, and Enabled = false excludes one.
  • On any other class — an opt-IN marker: the class is registered as a component-based page (model-less AddPage<TComponent>(), rendered through the registered IComponentPageFactory). Decorate only components whose Render() produces a Page-rooted tree — plain view components are not navigation destinations, and page-ness cannot be inferred statically. Typed intents implemented by the component feed the generated AddIntents() like any page's.
[AttributeUsage(AttributeTargets.Class)]
public sealed class AutoNavigationPageAttribute : Attribute
Inheritance
AutoNavigationPageAttribute
Inherited Members

Properties

Enabled

Whether the automatic registration is enabled for this class. Defaults to true. When false the class is skipped by the generated AddPages(): it is not registered as a navigation target nor added to the service collection. Use it for pages that are never navigated to through Nalu navigation (e.g. hand-managed dialogs). A class excluded here can still be registered manually via AddPage<TPage>() and friends.

public bool Enabled { get; set; }

Property Value

bool