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

The Archive Base Latest Questions

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

hi we have a PRISM WPF MVP application, we would like to have a

  • 0

hi we have a PRISM WPF MVP application, we would like to have a state to share data between the views in the same module. Since PRISM by default doesnt have a state, was wondering if there is any way i could implement this. Presently i have injected a State with Dictionary as back-store, but the problem is its Global i.e available across the modules. i would really like to scope this injection being module specific.

I believe unity allows registering different classes to the same interface based on name, not sure if the only choice i have is to leverage that for my scenario.

Any help would be great! Thanks!

-ioWint

  • 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-24T16:25:13+00:00Added an answer on May 24, 2026 at 4:25 pm

    thanks for your updated solution. I was trying to avoid a name based Unity registration, which would force my Presenter in knowing the Modules State registration Key.
    I was reading stackoverflow posts on Unity and found the discussion over here Is it possible to override parameter values when using Method Injection with Unity? .

    After couple of hours of trial and errors, i ended up achieving the desired functionality.

    What i have done:

    I have a BaseClass for my Modules -> BaseModule:IModule i have a State Property in it which conforms to my IStateService defined in the Infrastructure.Interface. I Instantiate this State property in the BaseModule() constructor.
    Note: to go with this approach i have to make my Presenter’s have a public IStateService State; property..

    At the time of registering the Presenter in the module, i am specifying

    <UnityContainer>.RegisterType<MyPresenter, new InjectionProperty("State", State).
    

    Am overriding a public property in Presenter which has name “State” with the State instance value defined in the Module.
    this way i am able to get the Modules State as the State for each of the View’s presenter.

    Thanks guys for directing me towards a solution.

    -ioWint

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

Sidebar

Related Questions

I have a Prism v4 / MEF / WPF solution that loads module views
This relates to Composite Application Guidance for WPF, or Prism. I have one MainRegion
I have an application which I am developing using WPF\Prism\MVVM. All is going well
I'm looking for a WPF prism with ribbon application samples and tutorials. I have
We have the beginnings of a modular wpf application built using prism. We want
I have an application all done in WPF, using MvvM/Prism/Unity and Remote as datasource.
I am creating an application using WPF which is using Prism framework. I have
I have an application written using Prism 4.0. It has lots of Views which
I am working on a WPF/Prism 4/AvalonDoc application. One of my views is very
My application is build in C#4, using Prism (CAL) and WPF. We have the

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.