Modal Dialog

Topics: Prism v4 - WPF 4
Jul 19, 2011 at 11:45 AM

Hi,

I'm using WPF with Prism 4.0 and I want to show a modal dialog box which allows me to choose a document.  After I decided to select a document, another view must be shown in a region.

Note: I want to trigger the 'open document' dialog box from a menu item.  What is the best way to accomplish this?

Thanks and best regards,

Ivan

Developer
Jul 19, 2011 at 2:46 PM

Hi Ivan,

You might find the OpenFileDialog class useful. You can read more about it in this in this article from MSDN:

Dialog Boxes Overview

Once you select your document, you can use View Injection or Navigation to show a view in your region. You can read about them in the following chapters from the Prism MSDN documentation:

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi

Jul 19, 2011 at 5:08 PM

Dear Guido,

Thank you for your post.  Actually I would like to create a Window which will function as a modal dialog box since I need to show database records there.  Once I selected a document (database record) I need to open a view which will show the details of that selected record.

What would you suggest for this?

Thanks and best regards,

Ivan

Developer
Jul 20, 2011 at 1:07 PM
Edited Jul 21, 2011 at 1:09 PM

Hi Ivan,

You might find the RegionPopupBehaviors in the StockTrader Reference Implementation useful for this purpose.

You can find more information about this in this thread:

Prism+Mef+Regions+Share Childwindow with modules

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi

Jul 20, 2011 at 10:52 PM

Dear Guido,

 

Thank you for your comments.  I will take a look at it as soon as possible.

Thanks and best regards,

Ivan