开发者

With WPF Prism can you prevent two modules from trying to use the same region simultaneously?

开发者 https://www.devze.com 2023-01-05 21:14 出处:网络
Here is the overview of what I am trying to do.I have a region in the shell that is used for application modal dialogs. When a module wants to launch an application modal dialog it loads a custom Ligh

Here is the overview of what I am trying to do. I have a region in the shell that is used for application modal dialogs. When a module wants to launch an application modal dialog it loads a custom Lightbox control into the region and fills it with the content I want to display (warning, wizards, etc). I have the region defined in the shell because I assume it needs to be there for the lightbox background to block out the whole window.

The immediate situation th开发者_开发知识库at comes to mind is what happens if two modules trying to use the region at the same time, is there any prismy way of preventing another module from accessing a region until after the current use of the region is finished?

If there are better ways to accomplish what I want I am open to suggestions.


You could use the RegionPopupBehavior from the Prism RI to display dialogs and have the dialog's content set as views into regions.

You can read more about that here: http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=65394.

I hope this helps.

Thanks, Damian

0

精彩评论

暂无评论...
验证码 换一张
取 消