Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7553969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:12:31+00:00 2026-05-30T11:12:31+00:00

In my application, I’m using Prism and it loads three modules by discovery (Unity).

  • 0

In my application, I’m using Prism and it loads three modules by discovery (Unity).

When the modules are loading, they register each View in “TopLeftRegion” region.

I’m trying to perform a navigation of module views. I mean, create Before and Next methods where can activate (or ["TopLeftRegion"].Activate(..)) the current view in that region.

For example, Imagine I have:

|_ModuleA
|
|_ModuleB
|
|_ModuleC

If my current view is ModuleA, if I press Next, must show ModuleB, if I press Before must show ModuleA in that region.

I was watching the property:

regionManager.Regions["TopLeftRegion"].Views

But I don’t know to do this. The property View doesn’t allow to access to the data and move into it.

Here’s a simple project, I’m trying to create that method in ShellViewModel and I don’t get it. How can I do to navigate each module?

http://www.mediafire.com/?urnrwkrb29osrle

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:12:33+00:00Added an answer on May 30, 2026 at 11:12 am

    Prism doesn’t assume that there is only one active view in a region, so there aren’t any properties on the Region class that make this super simple. But it isn’t too tricky.

    The RegionManager class tracks which views are active in the ActiveViews property. It isn’t tracking which one view is active. In your case, your region only supports one active view, so you can just find the first view in that collection.

    The other tricky part is finding the active view in the Region.Views collection. Below I cast the Region.Views as a List so that I could use FindIndex to locate the index of that active view.

        private void Next(object commandArg)
        {
            IRegion myRegion = _regionManager.Regions["TopLeftRegion"];
            object activeView = myRegion.ActiveViews.FirstOrDefault();  //Here we're trusting that nobody changed the region to support more than one active view
            List<object> myList = myRegion.Views.ToList<object>();      //Cast the list of views into a List<object> so we can access views by index
    
            int currentIndex =  myList.FindIndex(theView => theView == activeView);
            int nextIndex = (currentIndex + 1) % (myList.Count);        //Wrap back to the first view if we're at the last view
            object nextView = myList[nextIndex];
            myRegion.Activate(nextView);  
        }
    

    Navigating to the previous view would be mostly the same, except you’d subtract one from the index instead of adding one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application is asp.net MVC. I want to put a textbox for date using mask.
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
The application I'm currently writing is using MVVM with the ViewModel-first pattern. I have
My application ( main.exe ) is executing a Child process ( child.exe ) using
Application is sending email by using MFMailComposeViewController , everything works just fine. However after
Application db connection in web service. i haveto connect the db using that web
Application was built using MS interop, to export .xls to infoPath and vice versa.
Application has many extension assemblies and they contain mappings for their classes. I need
Application configuration: Web application using java first method of creating JAX-WS 2.0 Web Services
Application : It has 3 views Views A,B,C. There is a Alert on View

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.