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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:51:04+00:00 2026-05-14T01:51:04+00:00

I need some help with overlaying views using the prism framework.Its a little more

  • 0

I need some help with overlaying views using the prism framework.Its a little more complexed than that so let me explain.I could be over-thinking this as well 😀

i have shell (wpf window) and i have 2 views(A & B – both usercontrols) in a module.
when the shell loads it loads view A. On view A i have a button to “popup” view B
for some user input. so naturally i would think to some sort of modal window/control, maybe even a popup. however the problem i face with the popup is that when i move the shell the popup remains fixed and it doesnt block events in view A. I’ve tried disabling view A to stop events being fired and i’ve also tried to use a to get the view B move with the shell. Only the canvas works but i now need a way to block it tho’. Is there anyway i can overlay a view on top of another view with prism? or how does everyone else create modal popups with prism & wpf? any advise or pointers would be greatly appreciated.

  • 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-14T01:51:04+00:00Added an answer on May 14, 2026 at 1:51 am

    If you want to use embedded dialogs without an extra window, you can use Prism’s RegionManager to achieve the outlined behavior. The trick is to put the PopUp region parallel to your main region in the visual tree:

    <Grid>
       <ContentControl cal:RegionManager.RegionName="MainRegion" IsEnabled={Binding IsNoPopUpActive} />
       <ContentControl cal:RegionManager.RegionName="PopUpRegion"/>
    </Grid>
    

    Now use the RegionManager to put view “A” into the “MainRegion”. Create a controller class similar to IPopUpDialogController. It should be responsible for putting your view “B” (or any other PopUpView in your application) into the “PopUpRegion” on demand. Addtionally, it should control a flag that signal the underlying “MainRegion” to be enabled or disabled. This way a user won’t be able to play with the controls in your view “A” until the pop up is closed.

    This can even be done in a modal fashion by using ComponentDispatcher.PushModal() before pushing a frame onto the Dispatcher. However, I would recommend avoid modal dialogs.


    Update: As requested in a comment, the IsNoPopUpActive could be implemented in the backing view model. There you could link it to RegionManager’s View collection for the popup region:

    public bool IsNoPopUpActive 
    { 
        get { return _regionManager.Regions["PopUpRegion"].Views.Count() == 0; }
    }
    

    Remember to trigger a PropertyChanged event as soon as you modify the views collection (add/remove a popup).

    Just for your information: nowadays I avoid disabling the controls in the background and instead insert a transparent panel. This avoids clicking on background controls. However, this does not handle keyboard input (tab-ing to controls). To fix the keyboard input you need to make sure that the keyboard focus is trapped in the popup (MSDN on WPF Focus concepts).

    Adding the following focus attributes to the popup region should do the trick:

    KeyboardNavigation.DirectionalNavigation="None"
    KeyboardNavigation.ControlTabNavigation="None"
    KeyboardNavigation.TabNavigation="Cycle"
    KeyboardNavigation.TabIndex="-1"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.