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 6249153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:11:09+00:00 2026-05-24T13:11:09+00:00

After weeks of using Prism I have been through every kind of navigation methods.

  • 0

After weeks of using Prism I have been through every kind of navigation methods. But there is still one thing that I haven’t been able to achieve with Prism “out-of-the-box”: navigate to a view-model instance. It is really easy to navigate to a view-model or view type but there is actually no way to navigate to a real view-model instance.

For example when I have a list of different view-model instances (different type too), if one is selected and I want to display it in my content region, I cannot achieve it unless I publish the change through event aggregation and I do not want that because this gets me stuck to one kind of view in my content region. What I want to do is to register a view-model instance into a region, so the view can load dynamically from data templates.

Actually I achieved to do this by creating a RegisterViewModelWithRegion as an extension method to RegionManager, it works well but it is not really neat as I have to manually lookup through my application resources, load the view, attach my view-model instance and then add the view to my region.

I really feel that I am missing something into the architecture because this kind of practice seem obvious to me but apparently I cannot find anybody having the same concern.

Your help and experience would much appreciated.
Thanks.

  • 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-24T13:11:10+00:00Added an answer on May 24, 2026 at 1:11 pm

    After some discussions with the Prism team, I found out that actually, using the Region.Add(object view) method to inject a view-model in a region is totally ok. It will give exactly the same result (except for some minor case).

    I inspected the ItemsControlRegionAdapter and all it does in the end is

    regionTarget.ItemsSource = region.Views;
    

    regionTarget being the target control (ListBox for example) and region.Views property being the objects you inject into your regions.

    Of course, thanks for your help Rachel 🙂

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

Sidebar

Related Questions

After having some issues using OpenSSL and gSOAP, I have been looking into the
I'm using Eclipse Galileo (v3.51). All of a sudden, after weeks of it starting
Sorry for my inpatience but after weeks staying up late and just having put
After spending three weeks learning Objective-C and Cocoa programming for my work, I've been
I have noticed that after my Grails app has been deployed for about 2
For a couple of weeks now, I have been working on migrating my client
After weeks of effort I have managed to write F# programs that use LLVM
I have pretty much finished my first WPF project after several weeks. Now I
I have been using git to push my local code to a server. I
I am using Mercurial to develop a client project. After I've been working on

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.