I'm learning Prism and I don't understand how the navigation is done with the URI. In this documentation example, the code on github use:
private void Button_Click(object sender, RoutedEventArgs e)
{
this.regionManager.RequestNavigate(RegionNames.MainContentRegion, calendarViewUri);
}
private static Uri calendarViewUri = new Uri("CalendarView", UriKind.Relative);
For the "missing link", look at ViewSwitchingNavigation.Calendar/CalendarModule.cs
, this is where the calendar module is initialized, i.e. where it makes all its stuff known to the rest of the application:
this.unityContainer.RegisterTypeForNavigation<CalendarView>();
This basically says "when asked to navigate to "CalendarView"
, create an instance of CalenderView
".