Skip to content

Navigation & Dialog — advanced contracts (RFC)

Status: partially implemented — P4 shipped in 0.8.0 / 0.8.1; remaining items deferred (see below).

Context

0.7.0 delivers:

  • [NavigationAware] / [DialogAware] with Prism 8 (Prism.Regions, Prism.Services.Dialogs) and Prism 9+ (Prism.Navigation.Regions, Prism.Dialogs) namespace resolution
  • [NavigateCommand] / [NavigateOnChanged]IRegionManager.RequestNavigate
  • [ShowDialogCommand]IDialogService.ShowDialog

0.8.0 / 0.8.1 (P4) delivers:

  • [FromNavigationParameter] / [FromDialogParameter] — typed parameter binding on [ObservableProperty] members
  • PSG7006–PSG7008 / PSG7103–PSG7105 diagnostics
  • 0.8.1 — fix CS0579 when parameter attributes are used on partial properties (C# 13+)

Samples: Prism 9 DashboardViewModel (userId navigation parameter) and ConfirmDialogViewModel (message dialog parameter) demonstrate end-to-end binding.

IdeaValueRisk / costRecommendation
IConfirmNavigationRequestLess boilerplate for “unsaved changes” promptsLow–medium; platform-specific UX still manualDefer until [NavigateCommand] usage is validated in samples
IRegionMemberLifetime (KeepAlive)Simple page cacheLowSmall follow-up if users request it
IJournalAwareBack-stack integrationMedium; journal APIs differ by platformDefer
Region name constant generationFewer string typosLow if scoped to const emission onlyOptional; avoid XAML/view discovery
CloseDialog helper on [DialogAware]Shorter VM code for Prism 9 DialogCloseListenerLowConsider with [DialogAware] docs/examples

Explicitly out of scope

  • IL weaving, runtime containers, or XAML rewriting
  • Full navigation graph / state-machine generation
  • INavigationService abstraction across MAUI vs desktop (differs too much from Region-first desktop samples)

P4 acceptance (met in 0.8.x)

  1. [x] At least one sample flow uses typed parameter binding end-to-end.
  2. [x] New diagnostics use the PSG7xxx band consistently.
  3. [x] Prism 8 and 9 integration tests cover each new attribute against real Prism.Core (plus platform contracts where required).

Released under the MIT License.

Released under the MIT License.