![]() ![]() ViewModels child namespace has a name that corresponds with that of a view and that the corresponding view is in a. Prism associates a view model with a view using a default convention which assumes that a view model is in the same assembly as the view is in a. View Models & NavigationĮach of the views has its data context set to a view model that is wired to the view using Prism's ViewModelLocator. This enables moving back and forth between the two views using Prism's navigation capabilities. In RegisterTypes(), I'm specifying that both views should be available for navigation. As a result, StaffView will be the default view that is displayed when the application is launched. In OnInitialized(), I'm requesting the RegionManager to place StaffView in ContentRegion. Public void RegisterTypes(IContainerRegistry containerRegistry)ĬontainerRegistry.RegisterForNavigation() RegionManager.RequestNavigate(RegionNames.ContentRegion, nameof(StaffView)) Var regionManager = containerProvider.Resolve() Public void OnInitialized(IContainerProvider containerProvider)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |