0

I have a user control that has a Grid as a main container. This control needs to display a modal dialog. However, when I show the dialog (implements ChildWindow) from the control, nothing happens, no errors and no dialog.

MyDialog dialog = new MyDialog();
dialog.Show();

If ChildWindow is something that can only be displayed from the main page and not user control, what's my alternative?

jv42
  • 8,521
  • 5
  • 40
  • 64
kateroh
  • 4,382
  • 6
  • 43
  • 62

1 Answers1

1

Solved the problem by creating a user control and putting it in the same grid location as the original control with Visibility:Collapsed. Every time I'd need a modal dialog, I'd disable the user control that is visible and set Visibility:Visible on the modal dialog user control.

This blog post helped a great deal: Silverlight Tutorial Part 6: Using User Controls to Implement Master/Detail Scenarios

kateroh
  • 4,382
  • 6
  • 43
  • 62