| 123456789101112131415161718192021222324252627 |
- using Test.ViewModels;
- using Test.Views;
- using UICommon.CommonContainer;
- namespace Test;
- //[Module(ModuleName = nameof(TestModule), OnDemand = false)]
- public class TestModule : IModule
- {
- public TestModule(ICommonContainer commonContainer)
- {
- commonContainer.AddModule(nameof(TestModule));
- commonContainer.AddNavigation(new(1, nameof(TestPage), true, null!));
- }
- public void OnInitialized(IContainerProvider containerProvider)
- {
- IRegionManager regionManager = containerProvider.Resolve<IRegionManager>();
- ICommonContainer commonContainer = containerProvider.Resolve<ICommonContainer>();
- regionManager.RegisterViewWithRegion(commonContainer.MainReginName, typeof(TestPage));
- }
- public void RegisterTypes(IContainerRegistry containerRegistry)
- {
- containerRegistry.RegisterForNavigation<TestPage, TestPageViewModel>(nameof(TestPage));
- }
- }
|