Reputation: 5
I have a silverlight application made with prism. I have a top region where the user can define some information to search, I have another region which is the workspace region who display the data in a datagrid. I would like to add another region on top of the workspace region (like a modal dialog box but a user control that i've defined) which will display the current detail of the selected line when the user double click on the datagrid. What is the best way to do that ?
Upvotes: 0
Views: 619
Reputation: 36
The following steps were simple enough for me
1) Create a Region for the overlay in the shell whose visibility is bound to a property in the shell view model
2) Create a PubSubEvent of bool (Or CompositePresentationEvent according to PRISM version you are using) which will show or hide the overlay region
3) Make the shell view model subscribe to the event and updates the overlay visibility property depending on the bool value
4) On mouse double click on a row publish the event and navigate the view in the overlay region
Upvotes: 1
Reputation: 36393
This article details how to use UserInteractions to create a dialog window
While the link references WPF, I have seen samples using a similar pattern with ChildWindows in Silverlight.
http://msdn.microsoft.com/en-us/library/gg405494(v=PandP.40).aspx#UserInteractionPatterns
Upvotes: 0