AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() To navigate to the MainPage using this registration method: _navigationService.NavigateAsync("MainPage") īy default, Prism uses a convention to find the ViewModel for the view (PageName + ViewModel = PageNameViewModel). protected override void RegisterTypes(IContainerRegistry containerRegistry)ĬontainerRegistry.RegisterForNavigation() This means when you request to navigate to the MainPage, you will provide the string "MainPage" as the navigation target. ![]() The following code snippet results in a mapping between the MainPage type, and the unique identifier/key of "MainPage". ![]() Default Registrationīy default, RegisterForNavigation will use the Name of the Page type as the unique identifier/key. Next, use the RegisterForNavigation extension method off of the IContainerRegistry. There are four ways to register your Pages for navigation default, custom, OnPlatform, and OnIdiom.Īpp.cs: protected override void RegisterTypes(IContainerRegistry containerRegistry) In order to register your Pages for Navigation, override the RegisterTypes method in your App.cs. Registering your Page for navigation is essentially mapping a unique identifier/key to the target view during the bootstrapping process.
0 Comments
Read More
Leave a Reply. |