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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:18:57+00:00 2026-05-14T04:18:57+00:00

Currently I’m building an application using latest Prism for Silverlight 4. I’ve a module

  • 0

Currently I’m building an application using latest Prism for Silverlight 4.
I’ve a module and in that module I’ve two views with view models. Also I’ve a module view with two regions for each view.
In module initialization I’m registering my views and view models in Unity container and also register views with corresponding regions.
The problem is that views should display something similar to table-detail information – first view shows available entities ans the second view shows detail of selected entity.

I need a way how to pass them initial selected entity. Newly created first view doesn’t have any selected entity and newly created second view doesn’t show any details.

Currently I’m doing that this way:
In module I create two view models and register them as instances in Unity container and then I register views as types for corresponding regions. Each view subscribes to EntitySelectedEvent from EventAggregator. Module initializer publish this event after initialization and this way two views are selecting the same entity.

I know this looks ugly – I tried publishing this event from one of view models but the problems is that EventAggregator in Prism doesn’t support durable subscribers – this means that if the second view model didn’t subscribe to event before the first view model fired it, it won’t receive and event. I know this is a normal behavior of EventAggregator, but I’m looking for a solution when view models can fire events without depending on initialization order of them – that is the first model can fire event before the second model was created and the second model will receive this ‘queued’ event after subscribing to it.

Are there any other messaging implementations for WPF/SL which do support such behavior or using a mediator (in my example it’s a module itself) isn’t such a bad idea after all? One big problem with mediator is that models must be created right away in initialize and they can’t be registered as types in container because this leads again to missing subscribers.

  • 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-14T04:18:57+00:00Added an answer on May 14, 2026 at 4:18 am

    Create a Model that will be shared by ViewModels of each of the views.

    When a row gets selected in View 1 its ViewModel (via a CurrentEntity property bound to a selected row) will update the Model.

    ViewModel of View 2 would subscribe to changes of Model’s CurrentEntity and will properly update it’s own CurrentEntity property that would cause it’s View to update.

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

Sidebar

Related Questions

Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
Currently i'm having trouble using two functions in my -(void)viewDidLoad , both of these
Currently writing a C# application it should do backups using GIT in the background.
Currently I'm using the following line to add a method's view as a subview
Currently i need to make an application that can list all of Google Drive
Currently I am using HTML files for parts of my user interface. I display
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently working with converting SQLException error messages into messages that are more useful for
Currently i have a node.js and socket.io application in development on my local machine
Currently, my MVC 3 app has a dependency on a static class that is

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.