模块化
This commit is contained in:
21
LoginModule/LoginModule.cs
Normal file
21
LoginModule/LoginModule.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using LoginModule.Views;
|
||||
using Prism.Modularity;
|
||||
using System.Reflection;
|
||||
namespace LoginModule
|
||||
{
|
||||
public class LoginModule : IModule
|
||||
{
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
IRegionManager regionManager = containerProvider.Resolve<IRegionManager>();
|
||||
regionManager.RegisterViewWithRegion("LoginRegion", typeof(LoginView));
|
||||
regionManager.RegisterViewWithRegion("LoginRegion", typeof(RegisterView));
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterForNavigation<LoginView>("LoginView");
|
||||
containerRegistry.RegisterForNavigation<RegisterView>("RegisterView");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user