1

Is my Catalog.xaml file correct to load (ShellProject or Module1) project in prism

<Modularity:ModuleInfo InitializationMode="OnDemand"
                       ModuleName="Module1Init"
                       ModuleType="Module1, Module1, Version=1.0.0.0"
                       Ref="file://Module1.exe">
md imran
  • 13
  • 4

1 Answers1

1

yes that is a way ! It is not necessary to put module details in Catalog file. You can also mention in your App.Config file

   <configSections>
   <section name="modules" type="Prism.Modularity.ModulesConfigurationSection, 
   Prism.Wpf" />
   </configSections>

   <modules>
   <module assemblyFile="ShellModule.dll"
moduleType="namespace, assemblyname, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
   moduleName="ModuleName" startupLoaded="True" /> 

In App.xaml file you need to put below code:

    <prism:PrismApplication x:Class="CCSEnterprise.RIA.App" x:ClassModifier="internal" 
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:prism="http://prismlibrary.com/">


    </prism:PrismApplication>

And in App.xaml.cs file:

        internal partial class App : PrismApplication
       {

    protected override IModuleCatalog CreateModuleCatalog()
    {
        return new ConfigurationModuleCatalog();

    }
    }

Hope it helpful to you.

Ravi Mali
  • 119
  • 9