Skip to content

[Navigation] Provide Name Identifiers for ALL Navigators usable by uen:Region.Navigator and make this ID required! #2977

Open

Description

@DevTKSS

What would you like to be added:

Provide Names for ALL Navigators that are Defined and therefore should be use-able/call-able by Name using uen:Region.Navigator. Things you will potentially need to change/update:

  • PanelVisibilityNavigator.NavigatorName is currently the only one with a NavigatorName Property:

    public const string NavigatorName = "Visibility";

    Possible ways to solve this

    1. So you should add this either to the Interface to ensure all INavigator's are call-able and registred by Name
      possible problem with this option:
      • neither const string nor static readonly string can be required by Interface
    2. define those Names just like in the PanelVisibilityNavigator at least for those Navigators Uno provides and make the .AddRegion<T,T>(string name, ...) Property required to be provided, so anyone who wants to Define and Register maybe their own ones (not sure if your Navigation Framework allowes this?) can do so, but has to adhere to this Contract/Signature of AddRegion.
  • Updating this current Version of ServiceCollectionExtensions:

    .AddRegion<Frame, FrameNavigator>()
    .AddRegion<ContentControl, ContentControlNavigator>()
    .AddRegion<Panel, PanelVisiblityNavigator>(name: PanelVisiblityNavigator.NavigatorName)
    .AddRegion<Microsoft.UI.Xaml.Controls.NavigationView, NavigationViewNavigator>()
    .AddRegion<ContentDialog, ContentDialogNavigator>(true)
    .AddRegion<MessageDialog, MessageDialogNavigator>(true)
    .AddRegion<Flyout, FlyoutNavigator>(true)
    .AddRegion<Popup, PopupNavigator>(true)

    To this:

    .AddRegion<Frame, FrameNavigator>(name: FrameNavigator.NavigatorName) // "Frame"
    .AddRegion<ContentControl, ContentControlNavigator>(name: ContentControlNavigator.NavigatorName) // "Content"
    .AddRegion<Panel, PanelVisiblityNavigator>(name: PanelVisiblityNavigator.NavigatorName) // "Visibility" - As-Is
    .AddRegion<Microsoft.UI.Xaml.Controls.NavigationView, NavigationViewNavigator>(name: NavigationViewNavigator.NavigatorName) // "NavigationView" - Default the requested Content/Data into `NavigationView.Content` removing the *current requirement* to use a nested e.g. Grid for this!
    .AddRegion<ContentDialog, ContentDialogNavigator>(isRequestRegion: true, name: ContentDialogNavigator.NavigatorName) // "ContentDialog" or "Dialog"
    .AddRegion<MessageDialog, MessageDialogNavigator>(isRequestRegion: true, name: MessageDialogNavigator.NavigatorName) // "MessageDialog" or "Message"
    .AddRegion<Flyout, FlyoutNavigator>(isRequestRegion: true, name: FlyoutNavigator.NavigatorName) // "Flyout"
    .AddRegion<Popup, PopupNavigator>(isRequestRegion: true, name: PopupNavigator.NavigatorName) // "Popup"

Why is this needed:

  • Defintly User Expirience! In the current Navigation Docs uen:Region.Navigator="Visibility" is the only mentioned available Navigator Name/Id while nobody exactly clarified this to be the Only Option, so this caused already missunderstandents and fails on User side, myself included as I started learning Uno!
    This Recent Example Case from our Uno Discord Server made it even more clearer

    • you should be estimating the User to misunderstand this Property an the Way, that we can Attach it with a Valid Value of Frame or FrameNavigator, and get a Native Frame Navigation. Of course, those of us who used the Navigation Extensions for longer, will know the difference and I am sure it had been noted somewhere in the Past, but even without assuming this as Native Frame Navigation
    • you could allow us to attach the FrameNavigator to a real Frame Control and let us archive e.g. on Windows Target the native Frame behaviour (animations, sliding and so on) 🚀 which is so far not the case when using Xaml Navigation 🙁
  • Only the PanelVisibilityNavigator is registred with an actual name ("Visibility") (see the ServiceCollectionExtensions Source Link above)

  • A Property which is only capable of having one valid Value could also be dropped because it should be the default value in that case, instead of the User have to fail until he recognizes that he needs to set:

  • uen:Region.Attached=true (recursively upwards)

  • uen:Region.Navigator="Visibility" <-- ALLWAYS this Name

  • AnyControl.Visibility="Collapsed" so you see, with this, we already needed to define that "Visibility" 2x 🙄

For which Platform:

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Desktop
  • Build tasks

Anything else we need to know?

Only PanelVisibilityNavigator supports actual Navigation while the NavigationViewNavigator does not consider inserting this by Default into ist Content by Default.

Activity

  1. added
    kind/enhancement
    triage/untriaged
    on Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions