tags:

views:

16

answers:

0

Hello,

I'm new to creating Silverlight applications. I have inherited a code-base that I've been told is using Prism. Based upon what I've seen in the code-base, this looks to be true. My problem is, I am just trying to open a dialog window and close a dialog window.

To open the dialog window, I'm using the following:

  UserControl myDialog = new MyDialog();

  IRegion region = myRegionManager.Regions["DIALOG_AREA"];
  IRegionManager popupRegionManager = region.Add(myDialog, null, true);
  region.Activate(myDialog);

The dialog I have designed appears. It has two buttons: "OK" and "Cancel". When a user clicks on of these dialogs, I want to close the dialog. My problem is, I have no idea how to do this. Because the dialog is not a ChildWindow, I cannot call this.Close(). But, when I change MyDialog to a ChildWindow, it is wrapped in some custom window chrome that i can't figure out how to get rid of.

How do I close a dialog in Prism? Thank you!

related questions