locked
[UWP]Load modules on demand RRS feed

  • Question

  • Hi,

    In my current WPF MVVM application, I was using PRISM 5.0. So using PRISM, I was loading module on demand when it's required to load using below line of code.

    this.moduleManager.LoadModule("SettingsModule");

    Even for navigation from one view to another, I used PRISM for navigation.

    Now, I am creating Windows 10 UWP application. For navigation, I used NavigationService of Template10.

    In this application, same as above I want to load module on demand WITHOUT using PRISM. So is there any way in Windows 10 UWP application or I have to use PRISM 6.0 for this.

    If it's available then I can skip the use of PRISM in Windows 10 UWP.

    Kindly guide me.

    Thanks,

    Ayaz Shaikh


    Tuesday, December 22, 2015 11:12 AM

Answers

  • You can use MEF with UWP apps.

    Look at the nuget package Microsoft.Composition

    This older article explains the basics

    https://visualstudiomagazine.com/articles/2012/12/20/mef-for-windows-store-apps.aspx

    Tuesday, December 22, 2015 1:11 PM
  • >>So is there any way in Windows 10 UWP application or I have to use PRISM 6.0 for this.

    There is no concept of "modules" in UWP, i.e. there is no built-in ModuleManager class or similar.

    In fact, the ModuleManager in Prism 6 belongs the Prism.WPF package so it is not available for use in a UWP. There is no equivalent class either.

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Tuesday, December 22, 2015 3:44 PM

All replies

  • You can use MEF with UWP apps.

    Look at the nuget package Microsoft.Composition

    This older article explains the basics

    https://visualstudiomagazine.com/articles/2012/12/20/mef-for-windows-store-apps.aspx

    Tuesday, December 22, 2015 1:11 PM
  • >>So is there any way in Windows 10 UWP application or I have to use PRISM 6.0 for this.

    There is no concept of "modules" in UWP, i.e. there is no built-in ModuleManager class or similar.

    In fact, the ModuleManager in Prism 6 belongs the Prism.WPF package so it is not available for use in a UWP. There is no equivalent class either.

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Tuesday, December 22, 2015 3:44 PM