I am trying a hello world program in Prism.WPF 7.0. I am trying to load a module from app.config file. Which is not working. I am using PrismApplicationsince isUnityBootstrapper Obsolete in Prism.WPF 7.0
My app.config as
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="modules" type="Prism.Modularity.ModulesConfigurationSection, Prism.Wpf" /> </configSections> <startup> </startup> <modules> <module assemblyFile="ModuleA.dll" moduleType="ModuleA.ModuleAModule, ModuleA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="ModuleAModule" startupLoaded="True" /> </modules> </configuration>
internal partial class App : PrismApplication { //ShellView _tempShellView; protected override Window CreateShell() { var _tempShellView = Container.Resolve<ShellView>(); var _tempDataContext = Container.Resolve<ShellViewModel>(); _tempDataContext.ShellWindowClose = new Action(() => _tempShellView.Close()); _tempShellView.DataContext = _tempDataContext; _tempDataContext.Initialize(); return _tempShellView; } protected override void InitializeShell(System.Windows.Window shell) { shell.Show(); } protected override IModuleCatalog CreateModuleCatalog() { return new ConfigurationModuleCatalog(); //return new DirectoryModuleCatalog() { ModulePath = Environment.CurrentDirectory }; } }
public class ModuleAModule : IModule { IRegionManager _regionManager; public ModuleAModule(RegionManager regionManager) { _regionManager = regionManager; } public void Initialize() { _regionManager.RegisterViewWithRegion("ContentRegion", typeof(ViewA)); } }
When I try this code with 6.3 it's working onUnityBootstrapper Need help on this Prism.WPF 7.0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)