ConfirmationChildWindow and Interaction Request

Topics: Prism v4 - Silverlight 4
Sep 15, 2011 at 11:13 PM
public InteractionRequest<ConfirmationChildWindowxxx = new InteractionRequest<ConfirmationChildWindow>();

I have a childwindow, which the user can launch and do somethings in there and I want to be able to launch the window and get back if the user confirmed the action he/she did in the child window.
I try using 
public InteractionRequest<ConfirmationChildWindowxxx = new InteractionRequest<ConfirmationChildWindow>();

but the compiler did not like it?

How can I do this please?  Sample code would be fantastic.

Sep 16, 2011 at 12:15 AM


I am sorry I didn't ask my question clearly.  Please ignore the previous post.

This is my business requirement: We have an object that contains many properties, we are required to have a "Save As" functionality.  

We need to pop a child window, where the user can enter the new name of the object.

My question, is how I pass and get back the name from the child window.  I am using SL4, MVVM, RIA Services, and obviously PRISM.

Any code sample would be great.



Sep 16, 2011 at 2:19 PM


Based on my understanding you might find the region popup behaviours useful for your scenario. These behaviors allow you to define a Popup Region, which is a region that shows its active view as a popup. Therefore, once you define that region, you only need to add a view to that region in order for it to be shown in the popup. Note that this view can implement its own behavior, have its own view model, and so forth; so you can process the data introduced in that view in the way that better suits your requirements and preferences (through a shared service, event aggregator, etc.)

You can find an a example of the usage of the Popup Region in the StockTrader RI,which implements this approach to show the NewsReader Article as a popup window.

Particularly you might take a look at the following code files:

  •      StockTraderRI_Desktop\StockTraderRI.Infrastructure\Behaviors\RegionPopupBehavior.cs
  •      StockTraderRI\StockTraderRI.Infrastructure\Behaviors\PopupDialogActivationBehavior.cs
  •      StockTraderRI_Desktop\StockTraderRI.Infrastructure\Behaviors\WindowsDialogActivationBehavior.cs

Also you can check how this region is define in the shell, in the following code snippet:

infBehaviors:RegionPopupBehaviors.ContainerWindowStyle="{StaticResource PopupStyle}" 

I hope you find this helpful.

Agustin Adami